Repository navigation
Build/Test Tools: Limit PHPUnit for Core asset-only PRs - #13523
Closed
lancewillett wants to merge 3 commits into
Closed
lancewillett wants to merge 3 commits into
lancewillett wants to merge 3 commits into
Conversation
lancewillett
marked this pull request as ready for review
September 14, 2026 20:36
lancewillett
requested review from
adimoldovan,
desrosj,
johnbillion and
sirreal
September 14, 2026 20:36
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
adimoldovan
suggested changes
Sep 16, 2026
adimoldovan
left a comment
There was a problem hiding this comment.
The approach is good. I left some inline comments.
Fail grouped PHPUnit runs when no tests are selected. Bound coverage selection to five minutes and log why normal coverage is retained. Allow admin color SCSS and unrelated documentation or JavaScript test files alongside audited assets, while preserving the workflow's explicit path inclusions. Remove generated-path patterns and document the single-site test-group constraint.
adimoldovan
approved these changes
Sep 17, 2026
lucatume
approved these changes
Sep 21, 2026
wporg-sync
pushed a commit
that referenced
this pull request
Sep 21, 2026
Run the assets group on PHP 8.3 and MySQL 8.4 when a pull request changes only audited Core assets and unrelated companion files. Preserve normal coverage for other changes, non-PR events, and pull requests with the Full PHPUnit Matrix label. Compare the tested merge commit with its base parent, account for both sides of renames, and retain normal coverage when changed paths are unavailable or empty. Fail grouped PHPUnit runs when no tests are selected. Developed in: #13523 Props adrianmoldovanwp, afercia, johnbillion, lucatume, westonruter. Fixes #65889. git-svn-id: https://develop.svn.wordpress.org/trunk@63778 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync
pushed a commit
to WordPress/WordPress
that referenced
this pull request
Sep 21, 2026
Run the assets group on PHP 8.3 and MySQL 8.4 when a pull request changes only audited Core assets and unrelated companion files. Preserve normal coverage for other changes, non-PR events, and pull requests with the Full PHPUnit Matrix label. Compare the tested merge commit with its base parent, account for both sides of renames, and retain normal coverage when changed paths are unavailable or empty. Fail grouped PHPUnit runs when no tests are selected. Developed in: WordPress/wordpress-develop#13523 Props adrianmoldovanwp, afercia, johnbillion, lucatume, westonruter. Fixes #65889. Built from https://develop.svn.wordpress.org/trunk@63778 git-svn-id: http://core.svn.wordpress.org/trunk@62950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Core asset-only pull requests normally start the PHPUnit matrix. This selects one PHP 8.3/MySQL 8.4 job running
--group assetswhen the changes contain audited Core assets and no other relevant files.The classifier accepts CSS/JS under
src/js/, admin CSS and color SCSS, includes CSS, and tracked JavaScript undersrc/wp-includes/build/. Documentation, QUnit tests, typings, and selected JavaScript lint configuration can accompany asset changes. Explicit workflow inclusions—includingSECURITY.md, PHPUnit files, and relevant build tools—retain normal coverage.A depth-2 checkout compares the tested PR merge result with its base parent. NUL-delimited filenames and disabled rename detection preserve unusual names and both sides of renames. Empty or failed diffs retain normal coverage. Selection has a five-minute timeout and logs fallback reasons with safely quoted filenames.
The
Full PHPUnit Matrixlabel bypasses reduced coverage. Other events retain their existing matrix selection. The asset job is single-site; asset tests must not also belong to groups excluded byphpunit.xml.dist. Grouped PHPUnit runs fail if no tests are selected.Trac ticket: https://core.trac.wordpress.org/ticket/65889
Validation
self-repositorysyntax suggestions, compared with eight on trunk; the added job follows the existing reusable-workflow syntax. No other findings.Live GitHub routing for an asset-only PR still needs verification. This workflow-changing PR itself selects normal coverage.
Asset-only PR examples
These open PRs provide two concrete examples for verifying reduced coverage:
src/wp-admin/css/admin-menu.css,src/wp-admin/css/colors/_admin.scss, andsrc/wp-includes/css/admin-bar.css.tsconfig.json. This also exercises the companion-file exceptions.The exact inline classifier returned
assets-only=truefor both PRs’ actual merge diffs, using depth-2 checkouts and Linux Bash. Their branches were not changed. Live GitHub routing remains to be verified after this workflow lands: expect one Core assets job and the normal PHPUnit matrix to be skipped, unless the Full PHPUnit Matrix label is present.Use of AI tools
AI assistance: Yes.
Tool: Codex.
Model: GPT-6.
Used for: Workflow implementation, review, and validation. I reviewed the changes and take responsibility for them.