Migrate integration tests from SVN to wp-env#182
Merged
Conversation
fa704f4 to
9219e72
Compare
Modernises the integration test infrastructure to use wp-env instead of
the legacy SVN-based test setup. GitHub-hosted runners no longer include
SVN by default, causing test failures. This migration aligns with
WordPress's recommended testing approach and ensures consistency between
local development and CI environments.
Updates the workflow to install wp-env, removes MySQL service
configuration (now provided by wp-env), and eliminates the prepare-ci
script. The WordPress matrix now uses concrete version numbers ('6.8')
and 'master' instead of 'latest' and 'trunk', as wp-env expects actual
Git branch/tag references.
Removes the Codecov integration from CI (coverage can still be run
locally via composer scripts). Simplifies the matrix by removing
coverage-specific configurations.
Renames composer scripts to reflect their integration test purpose:
test → test-integration, test-ms → test-integration-ms.
Removes bin/install-wp-tests.sh (182 lines) which is no longer needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
9219e72 to
6f24cd7
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The plugin's integration tests relied on a legacy SVN-based setup that downloads the WordPress test suite directly from the WordPress.org repository. This approach has become problematic: GitHub-hosted runners no longer include SVN by default, causing test failures in CI. Beyond the immediate breakage, the SVN-based method creates inconsistency between local development environments and CI, complicating debugging and maintenance. The infrastructure has aged out of modern WordPress development practices.
Solution
This pull request modernises the integration test infrastructure by migrating to wp-env, WordPress's officially recommended testing environment. The wp-env approach uses Docker containers to provide a consistent, reproducible WordPress environment that works identically in both local development and CI contexts.
The workflow now installs and starts wp-env before running tests, eliminating the need for manual MySQL service configuration and SVN-based downloads. The 182-line
bin/install-wp-tests.shscript has been removed entirely, as wp-env handles all environment provisioning. Composer scripts have been renamed to better reflect their purpose (test→test-integration,test-ms→test-integration-ms), and yoast/phpunit-polyfills ^2.0 has been added to maintain compatibility with PHPUnit 9 whilst supporting broader PHP version testing.The existing
.wp-env.jsonconfiguration means the plugin was already prepared for this migration; this pull request completes the transition by updating the CI infrastructure to match. Tests continue to run against the same WordPress versions and configurations, but now through a more maintainable and reliable mechanism that aligns with community standards.🤖 Generated with Claude Code