maxbirkner/Coverage Map Action
Analyzes coverage for files changed in a PR, renders a treemap of test gaps, and enforces a coverage threshold.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 8, 2026
- License
- MIT
Pinned Snippet
uses: maxbirkner/coveragemap@71a44604a80c6c13e5254f1ff409b23d9b5a309b # v1.5.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| lcov-file | The path to the lcov.info coverage report file | yes | ./coverage/lcov.info |
| coverage-threshold | The minimum acceptable coverage percentage for changed files. Only used when gate-mode is "threshold". | no | 80 |
| gate-mode | How to gate the workflow on coverage. One of: - "threshold": fail when changed-files coverage is below coverage-threshold (default). - "baseline": fail when changed-files coverage is below the overall project coverage. - "none": never fail the workflow; report coverage without gating. | no | threshold |
| target-branch | The target branch to compare changes against | no | main |
| github-token | GitHub token to post PR comments | yes | — |
| pr-comment | Whether to post (and update) a coverage summary comment on the pull request. Set to "false" to suppress the PR comment and avoid cluttering the PR. | no | true |
| job-summary | Whether to write the coverage summary to the GitHub Actions job summary. Enabled with "true" to surface coverage on the workflow run page without posting a PR comment. | no | false |
| label | Optional label for identification (enables multiple instances). | no | — |
| treemap-title | Optional title rendered at the top of the treemap image. Defaults to "Coverage Treemap". | no | — |
| source-code-pattern | Optional glob pattern(s) for source code files to include in coverage analysis. Multiple patterns can be separated by commas (e.g., "src/**/*.ts,lib/**/*.js"). If not provided, defaults to common source code extensions. | no | — |
| test-code-pattern | Optional glob pattern(s) for test files to exclude from coverage analysis. Multiple patterns can be separated by commas (e.g., "**/*.test.ts,**/*.spec.js"). If not provided, defaults to common test file patterns. | no | — |
| github-app-id | Optional GitHub App ID for posting check annotations. When provided with github-app-private-key, enables posting up to 50 annotations to the PR using the GitHub Checks API. | no | — |
| github-app-private-key | Optional GitHub App Private Key for posting check annotations. When provided with github-app-id, enables posting up to 50 annotations to the PR using the GitHub Checks API. | no | — |
Outputs
| name | description |
|---|---|
| coverage-percentage | The overall coverage percentage for changed files |
| meets-threshold | Whether the coverage meets the specified threshold (true/false) |
| files-analyzed | The number of changed files that were analyzed |
| files-with-coverage | The number of changed files that have coverage data |