From 993325a6e7938cc0247e4652292f0ef33e6f8048 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 27 Jul 2026 08:29:37 -0700 Subject: [PATCH 1/2] Build/Test Tools: Trim the unit test matrix to boundary PHP versions. Reduce the PHPUnit matrix on the active branch to the highest and lowest supported version of each major PHP branch, matching the boundary testing already used on older branches. Version-specific failures cluster at the boundaries, so the intermediate minor versions add job count without adding coverage. This is especially useful when preparing backports across multiple branches, where the full matrix multiplies queued jobs and floods the shared runner pool during a release. Props lance.willett@automattic.com. See #65736. --- .github/workflows/phpunit-tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 81afd70449141..9a5ea2e596f8d 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -74,7 +74,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # Test highest and lowest supported version of each major. + php: [ '7.4', '8.0', '8.5' ] db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4', '9.7' ] tests-domain: [ 'example.org' ] @@ -153,7 +154,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # Test highest and lowest supported version of each major. + php: [ '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' ] multisite: [ false, true ] @@ -207,7 +209,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # Test highest and lowest supported version of each major. + php: [ '7.4', '8.0', '8.5' ] db-type: [ 'mysql', 'mariadb' ] db-version: [ '12.1' ] multisite: [ false, true ] From 2538d740ae65f9439c269a91244d75a470276fcd Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 27 Jul 2026 09:05:45 -0700 Subject: [PATCH 2/2] Build/Test Tools: Run the full PHP matrix on the weekly scheduled run. Push and pull request events test the boundary PHP versions only. The weekly scheduled run tests every supported version, so full coverage is preserved without multiplying job count on every change. Props lance.willett@automattic.com. See #65736. --- .github/workflows/phpunit-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 9a5ea2e596f8d..62123e8b798f2 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -74,8 +74,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # Test highest and lowest supported version of each major. - php: [ '7.4', '8.0', '8.5' ] + # 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' ] tests-domain: [ 'example.org' ] @@ -154,8 +154,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # Test highest and lowest supported version of each major. - php: [ '7.4', '8.0', '8.5' ] + # 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' ] multisite: [ false, true ] @@ -209,8 +209,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - # Test highest and lowest supported version of each major. - php: [ '7.4', '8.0', '8.5' ] + # 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', 'mariadb' ] db-version: [ '12.1' ] multisite: [ false, true ]