insightsengineering/Code Coverage Report Action
Action that converts a Cobertura XML report into a markdown report.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 15, 2026
- License
- MIT
Pinned Snippet
uses: insightsengineering/coverage-action@3179498004cf3a28cbd5b496ce580767888375b9 # v3.0.4tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| token | Github token to use to publish the check. | no | ${{ github.token }} |
| path | Path to the Cobertura coverage XML report. | no | coverage.xml |
| threshold | The minimum allowed coverage percentage, as a real number. | no | 0 |
| fail | Fail the action when the minimum coverage was not met. | no | true |
| publish | Publish the coverage report as an issue comment. | no | false |
| diff | Create a diff of the coverage report. | no | false |
| diff-branch | Branch to diff against. | no | main |
| storage-subdirectory | Subdirectory in the diff-storage branch where the XML reports will be stored. | no | . |
| diff-storage | Branch where coverage reports are stored for diff purposes. | no | _xml_coverage_reports |
| skip-diff-storage | Skip all interactions with the `diff-storage` branch (fetch, diff generation, badge build, commit, and push). When `true`, the action only produces a coverage report from the input XML and does not require write access to the repo. The PR comment falls back to a text coverage line instead of the badge image. | no | false |
| coverage-summary-title | Title for the code coverage summary in the Pull Request comment. | no | Code Coverage Summary |
| uncovered-statements-increase-failure | Fail the action if any changed file has an increase in uncovered lines compared to the `diff-branch`. This corresponds to pycobertura exit code 2, which indicates that at least one changed file has more uncovered lines than before (Miss > 0). Note that this is different from coverage rate reduction - it specifically checks for increases in the absolute number of uncovered lines. | no | false |
| new-uncovered-statements-failure | Fail the action if new uncovered statements are introduced AND overall coverage improved (total uncovered lines decreased) compared to the `diff-branch`. This corresponds to pycobertura exit code 3, which only occurs when total uncovered lines decreased (Miss <= 0) but there are still new uncovered statements (Missing != []). To fail on ALL new uncovered statements regardless of overall coverage improvement, use this flag together with `coverage-reduction-failure: true`. | no | false |
| coverage-rate-reduction-failure | Fail the action if the overall coverage percentage (rate) decreases compared to the `diff-branch`. This is different from `uncovered-statements-increase-failure` which checks for absolute increases in uncovered lines. This flag specifically looks at the coverage percentage and fails if it goes down, regardless of whether uncovered lines increased or decreased. This is a more forgiving approach that focuses on the relative coverage rate rather than absolute uncovered line counts. | no | false |
| pycobertura-exception-failure | Fail the action in case of a `Pycobertura` exception. | no | true |
| togglable-report | Make the code coverage report togglable. | no | false |
| report-low-coverage-only | When true, the detailed coverage report will only include files where coverage is less than 100%. The TOTAL summary line is always included. | no | false |
| exclude-detailed-coverage | Whether a detailed coverage report should be excluded from the PR comment. The detailed coverage report contains the following information per file: number of code statements, number of statements not covered by any test, coverage percentage, and line numbers not covered by any test. | no | false |
Outputs
| name | description |
|---|---|
| summary | Summary of coverage report |