Resolve the WordPress test matrix from wordpress.org at run time - #87
Merged
Merged
Conversation
The hardcoded matrix stopped at 6.9 while WordPress is on 7.1, so two majors were shipping untested. Fetch the supported x.y branches from the stable-check API on each run and test the newest five, add a non-blocking trunk job, and run weekly so new releases get covered without anyone editing the workflow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
joehoyle
force-pushed
the
dynamic-wp-test-matrix
branch
from
September 22, 2026 13:52
ba0a1c0 to
565d17f
Compare
Trunk was a single extra job on one PHP version, which left it with less coverage than the stable branches. Append it to the resolved list so it is part of the full grid, and keep it non-blocking by matching on the version name rather than a separate matrix flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborourke
approved these changes
Sep 22, 2026
roborourke
left a comment
Collaborator
There was a problem hiding this comment.
Handy pattern there.
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.
The test matrix is a hardcoded list of WordPress versions, and it had already fallen behind: it stopped at 6.9 while WordPress is on 7.1.1, so two majors were shipping without any CI coverage. That will keep happening every release cycle unless someone remembers to edit the workflow.
Instead, a small first job asks wordpress.org's stable-check API for every release, collapses them to x.y branches, and feeds the newest five into the PHPUnit matrix. Today that resolves to 6.7 through 7.1. When 7.2 ships it appears on the next run and 6.7 drops off, with no PR required. Trunk rides along as
nightlyacross every PHP version and is non-blocking, so it cannot fail the run but gives early warning on the next release. A weekly cron andworkflow_dispatchmake sure the resolved versions and trunk are exercised even when the repo is quiet.The install script already understood
x.yandnightlyinputs, so it is untouched. One trade-off: if the wordpress.org API is unreachable the resolver job fails and no tests run. I preferred a loud failure over a silent fallback to a stale list, but a hardcoded fallback is easy to add if reviewers would rather have it.🤖 Generated with Claude Code