WordPress core PHPUnit runs fall from 32 to 21 minutes
A 2 December 2026 post on Make WordPress Core reports that PHPUnit on trunk went from about 32 minutes in July to about 21 in late November, and reruns fell from 53% to 7%. Here is what changed and what a plugin or agency pipeline can reuse.
PHPUnit runs on WordPress trunk finished in about 21 minutes in late November 2026, down from about 32 minutes in July, and the share of runs that needed a rerun dropped from 53% to 7%, according to the Make WordPress Core write-up published on 2 December 2026. It follows the 30 July post on matrix trims and rerun fixes.
If you contribute to core, the day-to-day change is that a routine pull request now runs 68 PHPUnit jobs instead of 86, and you add a label when you want the full set. If you maintain a plugin or an agency test suite, the list of changes reads as a checklist of the things that also slow down and destabilize smaller WordPress pipelines.
Compare job-minutes with the wall-clock figure
The post compares two windows of pushes to trunk: 8 to 27 July, and 17 November to 1 December. The data is the PHPUnit Tests workflow in the wordpress-develop repository, read through the GitHub Actions API.
| Metric | July 2026 | Late November 2026 | Change |
|---|---|---|---|
| Jobs per run | 179 | 79 | 56% fewer |
| Job-minutes per run | about 2,100 | about 1,090 | 48% fewer |
| Wall-clock time | about 32 min | about 21 min | 35% shorter |
| Runs needing a rerun | 53% | 7% | 46 points fewer |
Job counts and durations are averaged over 33 runs in July and 30 in November. The rerun figure is broader and counts every completed run in each window, 173 in July and 179 in November.
Job-minutes fell faster than wall-clock time, 48% against 35%. That fits a saving made mostly by dropping jobs: the slowest remaining job still sets the finish time, so the wall clock moves less than the total compute does.
The Full PHPUnit Matrix label for pull requests
The largest single cut is in the matrix. On a routine pull request the database axis is smaller, so the workflow starts 68 jobs instead of 86 (pull request #13447). The full 182-job matrix runs once a week. A contributor who wants it on one pull request adds the Full PHPUnit Matrix label (#13448).
A pull request that touches only CSS or JavaScript files in core runs a single PHPUnit job (#13523). The post does not say what that one job covers.
The 6.8 branch received the same treatment. Its matrix trim landed on 28 July (#12726, changeset r62863), and on 23 September the branch picked up the same routine trims as trunk (#13640).
One gap in the table: the November average is 79 jobs per run, above the 68-job routine matrix. The post does not break that down. Weekly full-matrix runs land on trunk and may account for part of it, but that is my reading, not something the post states.
Retrying setup downloads brought reruns to 7%
The post ties the drop in reruns to setup failures, meaning the network-bound steps (package downloads and registry calls) that now either retry on failure or read from a cache. It does not define a rerun beyond that, and it gives no breakdown of the 53% by cause.
The fixes land on the local development environment (#12735), WP-CLI (#14789) and the CI setup downloads (#15210). The install and upgrade jobs now share a single release ZIP instead of each fetching their own (#16106).
The general shape of the problem will be familiar to anyone running a matrix build. Dozens of jobs each perform their own setup, so a transient fetch error in one of them can turn the whole run red. A retry at that step is the cheap fix, which is my reasoning rather than a breakdown the post provides.
The rerun rate matters beyond the wall-clock figure. At 53%, more than half of the completed runs in the July window needed a second attempt. At 7% the first pass usually stands.
Core contributors now see every test slower than one second
Every push to trunk now publishes test timing metrics to CodeVitals (#13083), and any test that takes longer than one second appears as an annotation on the run (#13212). That turns a vague sense that the suite is slow into a list of named tests.
A core test that reaches a real external host without a mock now fails the run (#13407). A real network call inside a unit test is slow when the remote end is healthy and flaky when it is not, so the rule plausibly helps both speed and flakiness, though the post does not quantify either effect.
Audit loose assertEquals() calls the way 7.2 did
Alongside the CI work, a cleanup effort during the 7.2 cycle cut loose assertEquals() calls from 501 to 167 and tests with no assertions from 101 to 8. The counts are for the 7.2 cycle, which is now at WordPress 7.2 RC4.
Loose equality hides type mismatches, and a test with no assertion passes whatever the code does. Neither change makes the suite faster, but both make a green run mean more.
Coverage also grew. The matrix now includes PHP 8.6, which is allowed to fail for now, plus MySQL 26.10 and MariaDB 12.3 and 13.0 (changesets r63480, r65279 and r65280). The post does not say whether these additions fall inside the measured windows, so I would not read the 21-minute figure as including or excluding them.
Both windows ran on GitHub-hosted runners
The post says the larger-runner switch exists but is not set. A repository variable named RUNNERS_NAME can route jobs to a dedicated runner on any branch (#12745, #12847). With it unset, the trunk jobs in both windows used GitHub-hosted images, ubuntu-24.04 in July and ubuntu-26.04 in November.
That is the useful part for anyone copying the approach. The table reflects the changes the post lists, a smaller routine matrix, a single job for asset-only pull requests and retries in setup, with no change in runner size. The post does not split the gain by change, and it does not say whether the move from 24.04 to 26.04 altered per-job times.
Test isolation and test tools carry into 7.3
The post points to two 7.3 projects that continue from the 7.2 wrap-ups (Trac #65893 and #65819): test isolation, tracked in #66755, and test tools, in #66757. The author says more detail is coming from the Build/Test Tools group and that both projects want contributors. The post also credits a dozen named contributors for the 7.2 work.
phpunit-tests.yml as the reference implementation
None of the specific pull requests apply outside wordpress-develop, but the pattern does:
- Split the matrix. Run a small set of PHP and database versions on every push and the full set on a schedule or behind a label.
- Skip the PHP matrix when only assets change. A CSS-only or JavaScript-only pull request does not need every database version.
- Retry and cache every network step in setup: Composer and npm installs, WP-CLI, WordPress ZIPs. Fetch a shared artifact once per run, not once per job.
- Fail tests that make real HTTP requests and mock the HTTP layer instead.
- Record per-test timing and flag anything over a threshold. One second is the line core chose.
- Count your
assertEquals()calls and your assertion-free tests. Both numbers are cheap to get and say how much a green run is worth.
The reference implementation is the phpunit-tests.yml workflow in the wordpress-develop repository, and the pull request numbers above identify each change if you want to read the diff.
Check your rerun rate first. If a noticeable share of runs are red on the first attempt and green on the second, setup retries are a reasonable first thing to try. Results will vary with your pipeline.
Hatamoto is an open-source CMS written in Go: one binary and Postgres serve the site, the admin and the API, and plugins run in a WebAssembly sandbox. If you build sites on WordPress, see how it compares or give Hatamoto a try.
Discussion
Leave a comment
0 comments