#52786 closed defect (bug) (fixed)
Fix the code coverage reporting
Reported by: | jrf | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.7 |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
As reported by Juliette on #51734:
So... this broke the code coverage reporting as it seems it was forgotten to update the code coverage configuration in the phpunit.xml.dist
file.
Last commit on which code coverage was run is commit [50436]
See: https://app.codecov.io/gh/WordPress/wordpress-develop/
It can also been seen in the GH Actions code coverage runs which report:
==> Reading reports - file not found at wp-code-coverage-single-clover-cded2eb52aa71a398d1d0cd87f8674b383512c0b.xml --> No coverage data found.
I'll upload the patch which should fix this in a moment and which basically reverts [48847].
Note: this patch will also need to be backported.
I'll also upload a second patch (optional) which would (should) allow for manually triggering code coverage runs. Committing that patch would allow us, in the future, to test that specific build changes do not break the code coverage build by manually triggering a build on a branch/PR.
Attachments (3)
Change History (14)
#3
@
4 years ago
Own ticket ? Okay, fair enough.
In the 52786.diff
patch, I think it would be useful to add the tests/phpunit/multisite.xml
file and the code coverage workflow file .github/workflows/test-coverage.yml
as files which should trigger the workflow when changed.
To confirm that my original patch 52786-fix-codecoverage-config.patch
actually fixes the issue, see this test run I did:
https://codecov.io/gh/WordPress/wordpress-develop/tree/trac-51734%2Ffix-code-coverage-reporting/src
This ticket was mentioned in PR #1092 on WordPress/wordpress-develop by jrfnl.
4 years ago
#4
- Keywords has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/52786
#5
@
4 years ago
Huh, I created this ticket but Trac timed out and I thought it didn't get saved so I went and did something else. Thanks for following up.
I copied the original patches over from #51734 to have them in one place.
52786.diff is an expanded version of 52786-allow-manual-triggering-codecov-workflow.patch that will trigger a build when the
phpunit.xml.dist
file is updated. Since this file configures how the test suite runs and how code coverage reports are compiled, it makes sense to run the workflow every time this is updated.CC @johnbillion.