#52141 closed feature request (fixed)
Make test coverage reports easier to digest
Reported by: | jorbin | Owned by: | jorbin |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
Right now, code coverage reports are uploaded as artifacts to the github action. This means that in order to view the coverage reports, you need to download, unzip, and then run a local server which can be a bit cumbersome. It would be better if we could more easily view the codecoverage
Change History (14)
#2
@
4 years ago
- Milestone changed from Awaiting Review to 5.7
I think using a repo for the time being could work well until we find an external service we can utilize.
#3
@
4 years ago
I've used Codecov and Coveralls successfully in the past. Rather easy to set up with PHPUnit & GitHub Actions, although I do recommend a good config to reduce noise.
#4
@
4 years ago
@swissspidy do you recommend one over the other?
We would definitely not generate coverage on every commit (daily would probably be more appropriate). Codecov documents support for this using Flags, but I couldn't find an equivalent on Coveralls.
Both seem to be 100% free for open source projects, and both have an officially maintained GitHub Action.
#5
@
4 years ago
I'd lean towards Codecov as it does have more powerful features like flags (e.g. to separate unit tests and integration tests) and merging reports (e.g. to merge multisite and non-multisite test coverage reports, or to merge JS and PHP coverage reports), which are useful when you run multiple tests.
#6
@
4 years ago
Great! Let's try this out in the new year. Anything that we can add to help us prevent blunders is a good thing.
This ticket was mentioned in PR #833 on WordPress/wordpress-develop by aaronjorbin.
4 years ago
#7
- Keywords has-patch added
Better visualize our code coverage in order to avoid blunders
This will likely take a while to get working correctly
#8
@
4 years ago
https://codecov.io/github/aaronjorbin/wordpress-develop/commit/f73b27a7eb9e5f71de5ab7646a2616fba1da381b is an example of what we can get from codecov
#9
@
4 years ago
- Owner set to jorbin
- Resolution set to fixed
- Status changed from new to closed
In 49903:
#10
@
4 years ago
Just following up that the coverage reports can be found here: https://codecov.io/gh/WordPress/wordpress-develop.
One idea of a place we can put the code coverage is to upload it to a new repo that uses github pages. https://github.com/marketplace/actions/push-a-file-to-another-repository can be used to push the html files.