CI: migrate test workflows to shared composite actions - #47
Merged
Conversation
Migrate tests.yml and tests_legacy.yml to consume the wp-media/workflows setup-php-composer and setup-wp-tests composite actions, mirroring the wp-media/wp-rocket reference implementation. - Replace inline PHP/Composer/SVN/WP-test-suite setup with the shared composite actions (kept on @main as first-party). - Keep the MySQL 8 service container, concurrency group, fail-fast: false, timeout-minutes, and permissions: contents: read in the caller. - Register PHP/PHPUnit problem matchers in the caller (composite actions cannot persist ::add-matcher::). - SHA-pin actions/checkout to v7.0.1. - Run unit, integration, and admin integration test suites sequentially. - Add grouped weekly github-actions dependabot config targeting develop. - Remove bin/install-wp-tests.sh (now ships with setup-wp-tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
remyperona
marked this pull request as ready for review
August 14, 2026 20:00
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.
What
Migrates the two test workflows (
tests.yml,tests_legacy.yml) to consume the shared composite actions inwp-media/workflows, mirroring thewp-media/wp-rocketreference implementation (test_wprocket*.ymlondevelop).Changes
tests.yml/tests_legacy.yml— each job is now a thin caller:wp-media/workflows/.github/actions/setup-php-composer@mainreplaces the inlinesetup-php+ramsey/composer-installsteps.wp-media/workflows/.github/actions/setup-wp-tests@mainreplaces the inline SVN install, MySQL 8 auth workaround, andinstall-wp-tests.shinvocation.::add-matcher::calls made inside a composite action once it finishes.mysql:8.0service container (services can't live in a composite action),concurrencygroup,permissions: contents: read,fail-fast: false, andtimeout-minutes: 30.actions/checkoutSHA-pinned to3d3c42e5aac5ba805825da76410c181273ba90b1(v7.0.1). The composite actions stay on@main(first-party).latest; 7.4 /5.9).composer test-unit,composer test-integration,composer test-integration-admin)..github/dependabot.yml— new; grouped weeklygithub-actionsupdates targetingdevelop.bin/install-wp-tests.sh— removed; the install script now ships with thesetup-wp-testscomposite action.Not migrated (intentional)
phpcs.ymlandphpstan.ymlalready consume the shared reusable workflows (wp-media/workflows/.github/workflows/*@main) and are left untouched.Validation
All changed YAML files validated locally. CI on this PR is the real test — the
mysqlservice container is the highest-risk piece to confirm green.