sgrankin/Code Coverage Annotations

Annotate your pull requests to show where test coverage is missing

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github_tokenGithub token from workflow. This is automatically generated by github and is rotated. You can limit scopes of this token as well.yes
github_base_urlGithub base URL. Set this if you are using a GitHub Enterprise Server or an instance on `ghe.com`.nohttps://api.github.com
coverage_file_pathPath to coverage file(s). Supports glob patterns (including **) and multiple paths separated by newlines.yes
coverage_formatFormat of coverage file. May be `lcov`, `cobertura`, `go`, or `simplecov`.no
working_directoryDirectory of the project being covered, relative to the workspace root. For `go` format, `go.mod` is read from here, and entry paths in the parsed coverage are rejoined with this prefix so they match PR diff paths. Defaults to the workspace root.no.
step_summaryWrite a summary to the GitHub Actions step summary. Set to 'false' to disable.notrue
pr_commentPost coverage summary as a PR comment. Updates existing comment on re-runs. Set to 'true' to enable.nofalse
comment_idNamespace for the PR comment marker. Jobs with different ids maintain separate comments on the same PR (e.g. one per coverage format); re-runs with the same id update in place. Empty uses the default shared comment.no""
report_headerCustom header text for coverage reports (PR comments and step summary).noCode Coverage Report
modeOperating mode: 'pr-check' (calculate delta against baseline) or 'store-baseline' (store coverage as baseline). Auto-detected if not specified.no
main_branchBranch whose pushes store coverage baselines. Set this when tracking a branch other than 'main' (e.g. 'master' or a long-running feature branch); baselines are namespaced per branch.nomain
calculate_deltaEnable coverage delta calculation. Set to 'false' to disable.notrue
note_namespaceCustom namespace for git notes storage.nocoverage
delta_precisionNumber of decimal places for delta display.no2
max_annotationsMaximum number of annotations to emit. GitHub limits annotations to 10 per run.no10
max_lookbackMaximum number of ancestor commits to search for baseline. Set to 0 to disable lookback.no50
sparkline_countNumber of historical data points to show in coverage sparkline. Set to 0 to disable.no10
debug_outputEnable debug output showing PR diff and coverage data.notrue
coverage_apiUpload the coverage report to GitHub's code coverage API (public preview). Requires 'code-quality: write' permission. Set to 'true' to enable.nofalse
coverage_api_languageLinguist language name for the coverage API upload (e.g. 'TypeScript', 'Go', 'Python'). Required when coverage_api is enabled.no""
coverage_api_labelLabel identifying the report uploaded to the coverage API (e.g. 'code-coverage/vitest').nocode-coverage
namedescription
coverage_percentageOverall code coverage percentage (line coverage; always set)
statement_percentageStatement coverage percentage (Go coverage only; empty otherwise)
files_analyzedNumber of files with coverage data
annotation_countNumber of annotations created for uncovered lines in the PR
coverage_deltaChange in the primary coverage metric compared to baseline (statement coverage for Go, line coverage otherwise), e.g. "+2.5" or "-1.2"
baseline_percentageBaseline percentage for the primary coverage metric (from git notes; statement coverage for Go, line coverage otherwise)
modeThe operating mode used (pr-check or store-baseline)