From a77a17d662b9c15897167dfb867a48666e913e0a Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 8 Sep 2026 10:36:03 -0700 Subject: [PATCH 1/4] Build/Test Tools: Trim the routine PHPUnit database matrix. --- .github/workflows/phpunit-tests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 8223d78780750..97c66dec7fc2e 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -113,7 +113,8 @@ jobs: # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4', '9.7' ] + # The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases. + db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }} tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -173,8 +174,8 @@ jobs: # # Creates a PHPUnit test job for each PHP/MariaDB combination. # - # All LTS versions of MariaDB supported by WordPress with greater than 1% usage according to w.org/stats should be - # tested. The exceptions to this rule are the most recent LTS and version 5.5. + # The scheduled run tests all LTS versions of MariaDB supported by WordPress with greater than 1% usage according to + # w.org/stats. The exceptions to this rule are the most recent LTS and version 5.5. # # The 5.5 release was intended as a drop-in replacement for MySQL. Because the MySQL 5.5 Docker containers do not # work, this ensures some level of MySQL 5.5 testing. @@ -205,7 +206,8 @@ jobs: # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mariadb' ] - db-version: [ '5.5', '10.3', '10.5', '10.6', '10.11', '11.4', '11.8' ] + # The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases. + db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }} multisite: [ false, true ] memcached: [ false ] From 5107491481ad382bb4f0c1aff03761e8249d05b9 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 8 Sep 2026 10:58:06 -0700 Subject: [PATCH 2/4] Build/Test Tools: Allow full PHPUnit runs by label. --- .github/workflows/phpunit-tests.yml | 43 +++++++++++++++-------------- tests/phpunit/README.md | 10 +++++++ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 97c66dec7fc2e..f7addc4b208a2 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -1,4 +1,5 @@ name: PHPUnit Tests +run-name: PHPUnit Tests${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && ' (full matrix)' || '' }} on: push: @@ -7,6 +8,7 @@ on: - '3.[7-9]' - '[4-9].[0-9]' pull_request: + types: [ opened, synchronize, reopened, labeled ] branches: - trunk - '3.[7-9]' @@ -54,9 +56,8 @@ on: # Cancels all previous workflow runs for pull requests that have not completed. concurrency: - # The concurrency group contains the workflow name and the branch name for pull requests - # or the commit hash for any other events. - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + # Unrelated label events get their own group so skipped runs cannot cancel active tests. + group: ${{ github.workflow }}-${{ github.event.action == 'labeled' && github.event.label.name != 'Full PHPUnit Matrix' && github.run_id || github.event.pull_request.number || github.sha }} cancel-in-progress: true # Disable permissions for all available scopes by default. @@ -71,11 +72,13 @@ jobs: permissions: contents: read if: | - github.repository == 'WordPress/wordpress-develop' || ( - github.event_name == 'pull_request' && ( - ! github.event.repository.private || - ! github.event.pull_request.draft || - contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ( github.event.action != 'labeled' || github.event.label.name == 'Full PHPUnit Matrix' ) && ( + github.repository == 'WordPress/wordpress-develop' || ( + github.event_name == 'pull_request' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) ) ) @@ -110,11 +113,11 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. + php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql' ] - # The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases. - db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }} + # Scheduled and labeled runs test the full database matrix. Other runs test the oldest listed version and supported LTS releases. + db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }} tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -174,8 +177,8 @@ jobs: # # Creates a PHPUnit test job for each PHP/MariaDB combination. # - # The scheduled run tests all LTS versions of MariaDB supported by WordPress with greater than 1% usage according to - # w.org/stats. The exceptions to this rule are the most recent LTS and version 5.5. + # Scheduled and labeled runs test all LTS versions of MariaDB supported by WordPress with greater than 1% usage + # according to w.org/stats. The exceptions to this rule are the most recent LTS and version 5.5. # # The 5.5 release was intended as a drop-in replacement for MySQL. Because the MySQL 5.5 Docker containers do not # work, this ensures some level of MySQL 5.5 testing. @@ -203,11 +206,11 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. + php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mariadb' ] - # The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases. - db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }} + # Scheduled and labeled runs test the full database matrix. Other runs test the oldest listed version and supported LTS releases. + db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }} multisite: [ false, true ] memcached: [ false ] @@ -271,8 +274,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. + php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql', 'mariadb' ] db-version: [ '12.1' ] multisite: [ false, true ] diff --git a/tests/phpunit/README.md b/tests/phpunit/README.md index b5fd1513600d6..5c973c17ee9b6 100644 --- a/tests/phpunit/README.md +++ b/tests/phpunit/README.md @@ -5,3 +5,13 @@ PHPUnit is the official testing framework chosen by the core team to test PHP co For more information, please review the relevant Core Handbook pages: - [PHP: PHPUnit](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/) - [Writing PHP Tests](https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/) + +## Run the full matrix on a pull request + +Add the `Full PHPUnit Matrix` label to a pull request in `WordPress/wordpress-develop` to run the same PHP and database combinations as the weekly scheduled run. The existing PHPUnit path filters still apply; documentation-only changes do not trigger tests. + +If you cannot apply labels, leave a PR comment asking a reviewer with triage access to add it. Fork PRs follow GitHub's usual workflow approval requirements. + +Adding the label starts a run without another code push. New commits run the full matrix while the label remains. Remove and reapply it to request another run for the current revision, or remove it to return subsequent runs to the reduced matrix. + +Look for `PHPUnit Tests (full matrix)` in GitHub Actions and the PHPUnit checks on the PR. Each run tests the PR's merge commit and retains its own logs and results, so check the revision before relying on an older run. From 6289dd62e5706aa15d6949fa43688f3014387cd8 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 9 Sep 2026 07:56:43 -0700 Subject: [PATCH 3/4] ci: retain widely deployed database versions in routine PHPUnit runs --- .github/workflows/phpunit-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index f7addc4b208a2..d4ff67d2b04f3 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -116,8 +116,8 @@ jobs: # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql' ] - # Scheduled and labeled runs test the full database matrix. Other runs test the oldest listed version and supported LTS releases. - db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }} + # Scheduled and labeled runs test the full database matrix. Other runs retain MySQL 5.7 compatibility and the widely used 8.x releases. + db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }} tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -209,8 +209,8 @@ jobs: # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mariadb' ] - # Scheduled and labeled runs test the full database matrix. Other runs test the oldest listed version and supported LTS releases. - db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }} + # Scheduled and labeled runs test the full database matrix. Other runs retain MariaDB 5.5 compatibility, 10.6, and newer LTS releases. + db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }} multisite: [ false, true ] memcached: [ false ] From d75e75ad774428fe067f0850183852bcd83d6614 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 9 Sep 2026 08:03:25 -0700 Subject: [PATCH 4/4] ci: isolate full PHPUnit matrix label triggers --- .../workflows/phpunit-tests-full-matrix.yml | 65 +++++++++++++++++++ .github/workflows/phpunit-tests.yml | 48 +++++++++----- tests/phpunit/README.md | 6 +- 3 files changed, 101 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/phpunit-tests-full-matrix.yml diff --git a/.github/workflows/phpunit-tests-full-matrix.yml b/.github/workflows/phpunit-tests-full-matrix.yml new file mode 100644 index 0000000000000..a6b42f6401174 --- /dev/null +++ b/.github/workflows/phpunit-tests-full-matrix.yml @@ -0,0 +1,65 @@ +name: PHPUnit Tests (label) +run-name: PHPUnit Tests${{ github.event.label.name == 'Full PHPUnit Matrix' && ' (full matrix)' || ' (ignored label)' }} + +on: + pull_request: + types: [ labeled ] + branches: + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + # Keep these paths in sync with phpunit-tests.yml. + paths: + - '**' + # Documentation and repository metadata. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!typings/**' + # Configuration for unrelated checks. + - '!.eslintrc-jsdoc.js' + - '!.prettierrc.js' + - '!.version-support-*.json' + - '!eslint.config.js' + - '!jsdoc.conf.json' + - '!phpcompat.xml.dist' + - '!phpcs.xml.dist' + - '!phpstan.neon.dist' + - '!tsconfig.json' + # Other test suites, tools, and workflows do not affect these tests. + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include documentation, tests, tools, and workflows used here. + - 'SECURITY.md' + - 'src/license.txt' + - 'tests/phpunit/**' + - 'tools/gutenberg/**' + - 'tools/local-env/**' + - 'tools/vendors/**' + - 'tools/webpack/**' + - 'phpunit.xml.dist' + - '.github/workflows/phpunit-tests.yml' + - '.github/workflows/phpunit-tests-full-matrix.yml' + - '.github/workflows/reusable-phpunit-tests-*.yml' + - '.github/workflows/reusable-prepare-gutenberg.yml' + +# Disable permissions for all available scopes by default. +permissions: {} + +# The called workflow manages concurrency. Unrelated labels never enter it. +jobs: + full-matrix: + if: github.event.label.name == 'Full PHPUnit Matrix' + permissions: + # Required by the called workflow's recovery job, which is skipped on PR events. + actions: write + contents: read + uses: ./.github/workflows/phpunit-tests.yml + secrets: + CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index d4ff67d2b04f3..1e4a22bb61afc 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -1,5 +1,5 @@ name: PHPUnit Tests -run-name: PHPUnit Tests${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && ' (full matrix)' || '' }} +run-name: PHPUnit Tests${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && ' (full matrix)' || '' }} on: push: @@ -8,11 +8,11 @@ on: - '3.[7-9]' - '[4-9].[0-9]' pull_request: - types: [ opened, synchronize, reopened, labeled ] branches: - trunk - '3.[7-9]' - '[4-9].[0-9]' + # Keep these paths in sync with phpunit-tests-full-matrix.yml. paths: - '**' # Documentation and repository metadata. @@ -47,17 +47,35 @@ on: - 'tools/webpack/**' - 'phpunit.xml.dist' - '.github/workflows/phpunit-tests.yml' + - '.github/workflows/phpunit-tests-full-matrix.yml' - '.github/workflows/reusable-phpunit-tests-*.yml' - '.github/workflows/reusable-prepare-gutenberg.yml' workflow_dispatch: + workflow_call: + secrets: + CODEVITALS_PROJECT_TOKEN: + required: false + CODECOV_TOKEN: + required: false + WPT_REPORT_API_KEY: + required: false + SLACK_GHA_SUCCESS_WEBHOOK: + required: false + SLACK_GHA_CANCELLED_WEBHOOK: + required: false + SLACK_GHA_FIXED_WEBHOOK: + required: false + SLACK_GHA_FAILURE_WEBHOOK: + required: false # Once weekly On Sundays at 00:00 UTC. schedule: - cron: '0 0 * * 0' # Cancels all previous workflow runs for pull requests that have not completed. concurrency: - # Unrelated label events get their own group so skipped runs cannot cancel active tests. - group: ${{ github.workflow }}-${{ github.event.action == 'labeled' && github.event.label.name != 'Full PHPUnit Matrix' && github.run_id || github.event.pull_request.number || github.sha }} + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true # Disable permissions for all available scopes by default. @@ -72,13 +90,11 @@ jobs: permissions: contents: read if: | - ( github.event.action != 'labeled' || github.event.label.name == 'Full PHPUnit Matrix' ) && ( - github.repository == 'WordPress/wordpress-develop' || ( - github.event_name == 'pull_request' && ( - ! github.event.repository.private || - ! github.event.pull_request.draft || - contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) - ) + github.repository == 'WordPress/wordpress-develop' || ( + github.event_name == 'pull_request' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) ) ) @@ -114,10 +130,10 @@ jobs: matrix: os: [ ubuntu-24.04 ] # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. - php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql' ] # Scheduled and labeled runs test the full database matrix. Other runs retain MySQL 5.7 compatibility and the widely used 8.x releases. - db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }} + db-version: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }} tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -207,10 +223,10 @@ jobs: matrix: os: [ ubuntu-24.04 ] # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. - php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mariadb' ] # Scheduled and labeled runs test the full database matrix. Other runs retain MariaDB 5.5 compatibility, 10.6, and newer LTS releases. - db-version: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }} + db-version: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }} multisite: [ false, true ] memcached: [ false ] @@ -275,7 +291,7 @@ jobs: matrix: os: [ ubuntu-24.04 ] # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. - php: ${{ ( github.event_name == 'schedule' || contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql', 'mariadb' ] db-version: [ '12.1' ] multisite: [ false, true ] diff --git a/tests/phpunit/README.md b/tests/phpunit/README.md index 5c973c17ee9b6..679ed831112d2 100644 --- a/tests/phpunit/README.md +++ b/tests/phpunit/README.md @@ -8,10 +8,12 @@ For more information, please review the relevant Core Handbook pages: ## Run the full matrix on a pull request -Add the `Full PHPUnit Matrix` label to a pull request in `WordPress/wordpress-develop` to run the same PHP and database combinations as the weekly scheduled run. The existing PHPUnit path filters still apply; documentation-only changes do not trigger tests. +Add the `Full PHPUnit Matrix` label to a pull request in `WordPress/wordpress-develop` to run the same PHP and database combinations as the weekly scheduled run. The label-triggered workflow uses the same path filters as normal PHPUnit runs. If you cannot apply labels, leave a PR comment asking a reviewer with triage access to add it. Fork PRs follow GitHub's usual workflow approval requirements. -Adding the label starts a run without another code push. New commits run the full matrix while the label remains. Remove and reapply it to request another run for the current revision, or remove it to return subsequent runs to the reduced matrix. +Adding the label starts a separate run without another code push. An existing reduced-matrix run continues alongside it; its checks and results are preserved. New commits run the full matrix while the label remains. Remove and reapply it to request another run for the current revision, or remove it to return subsequent runs to the reduced matrix. + +Unrelated labels skip only the label-triggered workflow's `full-matrix` job and do not replace or cancel PHPUnit checks. Look for `PHPUnit Tests (full matrix)` in GitHub Actions and the PHPUnit checks on the PR. Each run tests the PR's merge commit and retains its own logs and results, so check the revision before relying on an older run.