GitHub Checks is meant to provide meaningful code coverage metrics as close to your workflow as possible. This is done by providing line-by-line coverage on your GitHub pull requests so you can access code coverage insights without leaving your code.
This feature is only available for GitHub users as it leverages GitHub Checks.
Notably, lines that you add on a commit without coverage, will show up in your pull request files view with an annotation.
Annotations making your code hard to read?
You can always just toggle them on and off with the "a" key
You can always hide annotations in the GitHub Files view by unselecting "Show annotations" in the top right of the file.
This GitHub feature only hides annotations by file, not for the full pull request.
You can also toggle checks on and off by pressing the "a" key.
To see annotations, first, go to the
Checks tab under any pull request.
Look for a
patch status underneath the
To view coverage information in line with your code, click on the icon to the right side of the annotation.
GitHub Checks and annotations for the patch status are enabled by default for all GitHub users.
Patch Commit Statuses have to be enabled and set up in order for checks to be present in pull requests.
If you have disabled
patch status in your YAML, Github Checks Annotations will not show up.
For example, Github Checks Annotations would be off if your YAML was:
coverage: status: patch: false
Annotations can be disabled using a flag on the top-level section of the codecov.yml file.
github_checks: annotations: false
Note: If GitHub checks are disabled but statuses are still set up, normal status checks will be used instead.
Self-hosted Codecov Admins
GitHub Checks Patch Annotations may be disabled by default in your instance. If you are not seeing them, and you don't have an entry on your yaml, try setting the above to
trueat either the instance and repo level codecov.yml.
If you want to disable the GitHub checks complete and revert to the older statuses, you can set the following flag on the top-level section of the codecov.yml file.
If Disabling checks is something that you need or want, we'd love if you could also drop us a ticket explaining how we can improve this feature to better suit your needs.
Updated 9 months ago