Post code coverage summaries as sticky PR comments.
Parses a Jest/istanbul coverage-summary.json, renders a markdown coverage table, and upserts a sticky comment on your PR. Warns when any metric falls below your threshold.
name: Coverage Report
on: [pull_request]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm test -- --coverage
- uses: ollieb89/code-coverage-reporter@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
threshold: 80| Input | Required | Default | Description |
|---|---|---|---|
token |
✅ | — | GitHub token |
pr-number |
✅ | — | PR number to comment on |
coverage-summary-path |
❌ | coverage/coverage-summary.json |
Path to summary file |
threshold |
❌ | 80 |
Minimum % before warning |
| Output | Description |
|---|---|
status |
ok or warning |
github-actions, code-coverage, testing, istanbul, jest, pr-comments, github, developer-tools
MIT © 2026 ollieb89