Skip to content

CI: migrate test workflows to shared composite actions - #47

Merged
remyperona merged 1 commit into
developfrom
ci/migrate-shared-composite-actions
Aug 14, 2026
Merged

CI: migrate test workflows to shared composite actions#47
remyperona merged 1 commit into
developfrom
ci/migrate-shared-composite-actions

Conversation

@remyperona

Copy link
Copy Markdown
Contributor

🤖 AI-generated — created by an automated pipeline. Review before acting on this.

What

Migrates the two test workflows (tests.yml, tests_legacy.yml) to consume the shared composite actions in wp-media/workflows, mirroring the wp-media/wp-rocket reference implementation (test_wprocket*.yml on develop).

Changes

  • tests.yml / tests_legacy.yml — each job is now a thin caller:
    • wp-media/workflows/.github/actions/setup-php-composer@main replaces the inline setup-php + ramsey/composer-install steps.
    • wp-media/workflows/.github/actions/setup-wp-tests@main replaces the inline SVN install, MySQL 8 auth workaround, and install-wp-tests.sh invocation.
    • PHP/PHPUnit problem matchers are registered in the caller — GitHub strips ::add-matcher:: calls made inside a composite action once it finishes.
    • Kept in the caller: the mysql:8.0 service container (services can't live in a composite action), concurrency group, permissions: contents: read, fail-fast: false, and timeout-minutes: 30.
    • actions/checkout SHA-pinned to 3d3c42e5aac5ba805825da76410c181273ba90b1 (v7.0.1). The composite actions stay on @main (first-party).
    • Existing PHP/WP matrices preserved (8.0–8.5 / latest; 7.4 / 5.9).
    • Test steps run unit → integration → admin integration sequentially (composer test-unit, composer test-integration, composer test-integration-admin).
  • .github/dependabot.yml — new; grouped weekly github-actions updates targeting develop.
  • bin/install-wp-tests.sh — removed; the install script now ships with the setup-wp-tests composite action.

Not migrated (intentional)

phpcs.yml and phpstan.yml already 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 mysql service container is the highest-risk piece to confirm green.

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 remyperona self-assigned this Aug 14, 2026
@remyperona
remyperona marked this pull request as ready for review August 14, 2026 20:00
@remyperona remyperona changed the title ci: migrate test workflows to shared composite actions CI: migrate test workflows to shared composite actions Aug 14, 2026
@remyperona
remyperona merged commit 2de415e into develop Aug 14, 2026
9 checks passed
@remyperona
remyperona deleted the ci/migrate-shared-composite-actions branch August 14, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant