Build/Test Tools: Preserve PHPUnit timing results for use in metrics - #13070
Build/Test Tools: Preserve PHPUnit timing results for use in metrics#13070lancewillett wants to merge 5 commits into
Conversation
|
End-to-end artifact validation passed. The canonical PHPUnit job temporarily allowed the pull request event to exercise the exact upload step: The downloaded artifact contained a well-formed, 8,909,462-byte Commit 8ccbcd4 restored the scheduled-only condition after the test. The final workflow also passed |
|
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. |
|
3ff9c19 addresses review feedback. We are limiting the metrics to trunk runs to prove the concept before adding all PR commits which can come later. For now, they'd add more storage and might not create an apples-to-apples comparison for an early look at slow tests. |
Trac ticket: https://core.trac.wordpress.org/ticket/65887
What this changes
The PHPUnit workflow uploads the existing JUnit report after every push to
trunkfrom one canonical job:The upload happens immediately after the main test suite, before later test-group runs replace the configured JUnit file.
Each
trunkpush produces one artifact namedphpunit-timing-results. The artifact containsjunit.xmlwith per-test timing data. Other events and matrix jobs do not upload timing artifacts.Why one artifact
One stable environment provides comparable results and the raw data needed to find slow tests. Collecting every test segment from every matrix job adds storage, naming, and analysis work without helping the first use case.
GitHub uses the repository default retention period. CodeVitals and aggregate trend reporting are handled separately in #13083.
How to validate
An end-to-end test temporarily allowed PR #13070 to run the upload step from the canonical job:
The downloaded artifact contained an 8,909,462-byte, well-formed
junit.xmlfile with timing for 30,871 test cases. The final condition limits uploads to pushes ontrunk.After merge, open the latest
trunkpush:https://github.com/WordPress/wordpress-develop/actions/workflows/phpunit-tests.yml?query=event%3Apush+branch%3Atrunk
The Artifacts section should contain
phpunit-timing-results. Download it with GitHub CLI:Reviewers can confirm that the existing configuration creates the uploaded file:
Testing
actionlintpassed.junit.xml.phpunit-timing-resultssuccessfully.