Skip to content

Annotate Coverage

Actions
GitHub Action for adding annotations for uncovered lines in PRs
v1.0.1
Latest
Star (0)

Build and Test

Annotate Coverage Action

This GitHub Action adds annotations for uncovered lines in PRs based on a coverage report.

What's new

Please refer to the release page for the latest release notes.

Usage

- uses: drew2a/annotate-coverage-action@v1
  with:
    # Path to the JSON coverage report generated by diff-cover
    # Required
    json_path: "diff_coverage.json"

Example of usage

- name: Run Tests
  run: |
    poetry run pytest --cov --cov-report=xml --cov-report=term-missing

- name: Compare coverage
  run: |
    poetry run diff-cover coverage.xml --compare-branch=origin/main --json-report=diff_coverage.json

- name: Annotate uncovered lines
  uses: drew2a/annotate-coverage-action@v1
  with:
    json_path: "diff_coverage.json"

Example of added annotations

image

License

The scripts and documentation in this project are released under the MIT License

Annotate Coverage is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Action for adding annotations for uncovered lines in PRs
v1.0.1
Latest

Annotate Coverage is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.