FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(testing): add codecov to generate test coverage reports by jsjoeio · Pull Request #3194 · coder/code-server · GitHub

feat(testing): add codecov to generate test coverage reports - #3194

Merged
repo-ranger[bot] merged 3 commits into
mainfrom
jsjoeio/add-code-coverage-reporter
Apr 22, 2021
Merged

feat(testing): add codecov to generate test coverage reports#3194
repo-ranger[bot] merged 3 commits into
mainfrom
jsjoeio/add-code-coverage-reporter

Conversation

jsjoeio commented Apr 22, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

This PR adds support to generate test coverage reports on PRs using @codecov

Changes

  • add CODECOV_TOKEN secret to project
  • add clover to coverageReporters for unit tests (see jest key on package.json)
  • add codecov as dev dependency
  • add coverage script to package.json
  • add ci step to run yarn coverage

Screenshots

todo

Checklist

  • dependencies added

Fixes #3151

Codecov requires .xml format.

We can get this from Jest by adding "clover"
to our coverageReporters.
jsjoeio added the testing Anything related to testing label Apr 22, 2021
jsjoeio added this to the v3.9.4 milestone Apr 22, 2021
jsjoeio self-assigned this Apr 22, 2021
jsjoeio requested a review from a team as a code owner April 22, 2021 22:11
jsjoeio marked this pull request as draft April 22, 2021 22:11
Comment thread package.json
"json-summary",
"text"
"text",
"clover"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 Bot commented Apr 22, 2021

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (main@72ca12c). Click here to learn what that means.
The diff coverage is n/a.

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72ca12c...bb0414e. Read the comment docs.

jsjoeio commented Apr 22, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

❗ No coverage uploaded for pull request base (main@72ca12c). Click here to learn what that means.
The diff coverage is n/a.

I believe this is because it's looking for code coverage on the main branch which we don't have since this is the first time we're adding it 😂

Source

jsjoeio marked this pull request as ready for review April 22, 2021 22:38
repo-ranger Bot merged commit 5ad8e68 into main Apr 22, 2021
repo-ranger Bot deleted the jsjoeio/add-code-coverage-reporter branch April 22, 2021 22:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dev]: add Codecov to track testing code coverage

2 participants


Back | FazBrowse Home | New Git URL