One of the main tenets at Codecov has been to get meaningful code coverage metrics as close to your workflow as possible. That way, you don’t have to context switch from your work.
Our users already receive detailed coverage metrics in their workflows including status checks and pull request comments, and line-by-line coverage data is always available on the Codecov UI. However, one of our most requested features is line-by-line coverage data in the pull request itself.
We are proud to announce line-by-line coverage on your GitHub pull requests via GitHub Checks. Now, you can access code coverage without leaving your code. If you are a Codecov user on GitHub, you can already see GitHub Checks on your Codecov patch coverage statuses. On a pull request, simply go to the
You can then view annotations by clicking the
CodecovChecks dropdown and selecting any
To view coverage information in line with your code, click on the icon to the right side of the annotation.
You can also view annotations in the
Files changed tab of a pull request.
If you are not a Codecov user, here are some easy steps to get started.
Frequently Asked Questions
What is shown in Github Checks?
- Coverage dropping and/or uncovered lines on code contributed to the current commit (what Codecov calls patch coverage).
What is not shown in Github Checks?
- Color-coded annotations on each line of your code changes.
- For example, we do not show lines that were covered or became covered
Why did we implement this way?
- Because Github Checks creates a callout box each time a set of lines are annotated, so to annotate every unchanged line and every covered line would be extremely noisy for the user. You can also configure how Checks are shown.
How do I hide/disable annotations?
- You can hide annotations in the “Files changed” tab on GitHub by unselecting “Show annotations”
- You can also disable annotations completely by following these instructions.