Skip to content

GitHub Action for adding annotations for uncovered lines in PRs

License

Notifications You must be signed in to change notification settings

drew2a/annotate-coverage-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

GitHub Action for adding annotations for uncovered lines in PRs

Resources

License

Stars

Watchers

Forks

Packages

No packages published