These docs are for v4.6. Click to read the latest docs for v2023.

GitHub Checks

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.

Annotations in the "Files Changed" View

🚧

Not Seeing Annotations?

Annotations only appear on checks that do not have flags or paths set on them. If you are using either, you will want to create an extra status. You can set this status to informational: true so it does not block your Pull or Merge Request.

Notably, lines that you add on a commit without coverage, will show up in your pull request files view with an annotation.

3538

Added line without coverage annotated in GitHub

Hiding Annotations in the Files View

📘

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.

3548

Hiding Codecov Annotations in Files view

Annotations in the "Checks" Tab

To see annotations, first, go to the Checks tab under any pull request.

1600

Look for a patch status underneath the CodecovChecks dropdown.

1600

To view coverage information in line with your code, click on the icon to the right side of the annotation.

1600

YAML Configuration for GitHub Checks and Codecov

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

Disabling GitHub Checks Patch Annotations via YAML

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 true at either the instance and repo level codecov.yml.

Disabling GitHub Checks completely via YAML

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.

github_checks: false

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.