[wp-trac] [WordPress Trac] #62296: Update the Test Coverage workflow to utilize the reusabe PHPUnit one

WordPress Trac noreply at wordpress.org
Thu Oct 24 14:03:09 UTC 2024


#62296: Update the Test Coverage workflow to utilize the reusabe PHPUnit one
------------------------------+-----------------------
 Reporter:  desrosj           |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  6.8
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------
 The workflow responsible for generating code coverage reports and
 submitting them to Codecov.io ([https://app.codecov.io/gh/WordPress
 /wordpress-develop/ 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62296>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list