mcclurejt/Cover 2
Parse LCOV coverage files and post a delta report as a PR comment
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| head-lcov-file | Path to the LCOV coverage file from the PR/head branch. Supports glob patterns (e.g., "coverage/*.lcov"). | yes | — |
| base-lcov-file | Path to the LCOV coverage file from the base/target branch. If not provided, no delta column will be shown. | no | "" |
| github-token | GitHub token for posting PR comments. Defaults to the built-in GITHUB_TOKEN. | no | ${{ github.token }} |
| thresholds | Two space-separated percentages: "lower upper" (e.g., "60 80"). Below lower = failure indicator, between = warning, above upper = success. | no | 60 80 |
| fail-below-threshold | Fail the action if overall line coverage is below the lower threshold. | no | false |
| show-badge | Include a shields.io coverage badge in the comment. | no | true |
| show-branch-coverage | Show branch coverage column in the table. | no | true |
| show-function-coverage | Show function coverage column in the table. | no | false |
| show-unchanged-files | Show files that exist in both base and head but have no coverage change. When false (default), only files with coverage deltas or new/removed files are shown. | no | false |
| comment-header | A unique identifier for the comment. Allows multiple instances of this action to post separate comments on the same PR. | no | coverage |
| save-baseline | Branch name to save the head LCOV file to as a baseline for future PRs. Creates an orphan branch if it doesn't exist. Typically used on push to the default branch (e.g., after a PR merge). | no | "" |
| baseline-from | Branch name to fetch the baseline LCOV file from for delta comparison. When set, overrides base-lcov-file. The baseline is fetched via the GitHub API — no checkout required. | no | "" |
| working-directory | Working directory for resolving relative file paths. | no | . |
Outputs
| name | description |
|---|---|
| total-line-rate | Overall line coverage percentage (0-100) for the head branch. |
| total-branch-rate | Overall branch coverage percentage (0-100) for the head branch. |
| total-line-rate-delta | Change in overall line coverage compared to base branch. |
| comment-id | ID of the created or updated PR comment. |
| report | The full Markdown report as a string. |