-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(testing): add codecov to generate test coverage reports #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov requires .xml format. We can get this from Jest by adding "clover" to our coverageReporters.
| "json-summary", | ||
| "text" | ||
| "text", | ||
| "clover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL about clover! very cool. from this config it looks like collecting JS test coverage metrics isn't too difficult! definitely something we'd love to get your guidance with on the product side, I think, at some point :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right?! I think it should be pretty easy. I believe I just need to install codecov then run it in CI and it should upload the results for us.
Would be more than happy to help on the product side :D
Codecov Report
@@ Coverage Diff @@
## main #3194 +/- ##
=======================================
Coverage ? 46.77%
=======================================
Files ? 23
Lines ? 1193
Branches ? 237
=======================================
Hits ? 558
Misses ? 451
Partials ? 184 Continue to review full report at Codecov.
|
I believe this is because it's looking for code coverage on the |
This PR adds support to generate test coverage reports on PRs using @codecov
Changes
CODECOV_TOKENsecret to projectclovertocoverageReportersfor unit tests (seejestkey onpackage.json)codecovas dev dependencycoveragescript topackage.jsonyarn coverageScreenshots
todo
Checklist
Fixes #3151