#62296 closed enhancement (fixed)
Update the Test Coverage workflow to utilize the reusabe PHPUnit one
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
The workflow responsible for generating code coverage reports and submitting them to Codecov.io (coverage analysis page) has a few shortcomings. Mainly, the logic for setting up and running PHPUnit tests is duplicated making more work for maintaining.
The workflow should be updated to make use of the reusable-phpunit-tests-v#.yml
reusable workflow file.
Other improvements that can be made:
- There is currently no
concurrency
configured for this workflow. This prevents multiple workflows for the same change from being run at the same time. For PRs, only the newest one should run, and there should only ever be one running at a time for a specific commit. - The workflow currently runs 4 different jobs to generate two report formats each for multisite and single site. PHPUnit supports generating multiple reports at the same time. The number of jobs can be cut in half.
- The workflow only runs for PRs when related files are changed. But when it runs, the report is not submitted to Codecov.io. This is supported and should be done as a way to fully test the workflow.
Change History (4)
This ticket was mentioned in PR #7631 on WordPress/wordpress-develop by @desrosj.
7 months ago
#1
#2
@
7 months ago
It also looks like we're not using flags
correctly (docs). Only one flag per report is supported, and using the same flag on overlapping results will cause some inaccurate numbers (multisite/single).
It seems that Components are more what we want for multisite/single site.
#3
@
7 months ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 59287:
The workflow responsible for generating code coverage reports and submitting them to Codecov.io (coverage analysis page) has a few shortcomings. Mainly, the logic for setting up and running PHPUnit tests is duplicated making more work for maintaining.
The workflow should be updated to make use of the reusable-phpunit-tests-v#.yml reusable workflow file.
Other improvements that can be made:
Trac ticket: https://core.trac.wordpress.org/ticket/62296