subhashmahimaluri/Vite PR Coverage Insight
Compare coverage between main and PR, post result to PR comment
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | GitHub token for PR comment | yes | — |
| mode | 'report' (default) posts the PR comment; 'baseline' publishes coverage to the baseline store on main-branch pushes | no | report |
| base | Path to base coverage-summary.json (optional since v2 — omit to auto-resolve from the baseline store) | no | — |
| head | Path to PR coverage-summary.json, or a directory of shard summaries to merge | no | — |
| coverage | Path to coverage-summary.json for 'baseline' mode (falls back to 'head') | no | — |
| baseline-branch | Orphan branch used as the baseline/history store | no | coverage-baseline |
| baseline-mode | How to resolve the base coverage: 'auto' (recorded baseline, falling back to dual-run), 'branch' (recorded only), 'scan' (dual-run: test the merge-base in this job — no baseline branch needed, requires checkout fetch-depth: 0 and run-script), or 'off' | no | auto |
| base-run-script | Command run on the merge-base worktree for dual-run baselines (defaults to run-script). Include dependency install, e.g. 'npm ci && npm run test:coverage' | no | — |
| fix-plan-file | Markdown coverage fix plan — changed files with gaps first, one ready-to-paste AI test prompt each (Copilot Chat etc.) | no | coverage-fix-plan.md |
| mutation | Path to a Stryker mutation report (json reporter output, mutation-testing-report-schema). Auto-detected at reports/mutation/mutation.json when omitted. Adds the 🧬 Mutation score card to the band, lists surviving mutants in changed files in the comment, and adds kill-prompts to the fix plan. In 'baseline' mode the score is recorded so PR runs show a Δ. | no | — |
| upload-artifact | Upload JSON + HTML + fix plan as a run artifact and link it from the PR comment (📥 download the full report) | no | true |
| cache | Actions cache acceleration for baseline lookups: 'on' (default) or 'off'. The baseline branch remains the source of truth, so 'off' only costs one extra API read — use it if the cache service is flaky on your runners. | no | on |
| thresholds | Coverage gate enforced by the action: a number for all metrics ('80'), per-metric pairs ('lines:85, branches:75') or JSON. Overrides coverage-insight.config.json. When unmet the job fails with a compliance table; without it the action only reports. | no | — |
| ai | AI assistance: 'off' (default, zero non-GitHub network calls), 'comment' (risk analysis + test suggestions), 'review' (adds advisory verdict) | no | off |
| ai-can-block | Only with ai: 'review' — allow a high-risk AI verdict to set the check run to neutral | no | false |
| run-script | Shell command to run tests with coverage before reading the coverage file (e.g. npm run test:coverage). On a non-zero exit the report still posts: failed test names are parsed from the output (vitest/jest), the comment enters the tests-failed state and the job is marked failed so the PR cannot merge. A non-zero exit caused only by the runner's own coverage thresholds is a warning, not a failure — use the `thresholds` input to gate. | no | — |
| test-failures | Path to test failures JSON file | no | — |
| use-check-run | Whether to use GitHub Check Run API | no | false |
| annotations | Diff annotations published via the check run: 'all' (default), 'coverage' (uncovered lines in touched files), 'failed-tests', or 'none' | no | all |
Outputs
no outputs