chathurabuddi/Jest PR Reporter
Turn Jest results into a sticky PR comment, inline check annotations, a job summary, and pass/fail gating.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GitHub token used to post the comment and check annotations. | no | ${{ github.token }} |
| results-file | Path to the Jest JSON results file (jest --json --outputFile=...). | no | jest-results.json |
| coverage-file | Path to the Jest coverage-summary.json (coverageReporters: json-summary). Optional; coverage sections are omitted when missing. | no | coverage/coverage-summary.json |
| run-tests | When "true", the action runs `test-command` before reporting. When "false" (default), it consumes pre-existing result files produced by a prior step. | no | false |
| test-command | Command used to run Jest when `run-tests` is "true". The required reporting flags are appended automatically. | no | npm test |
| working-directory | Directory to resolve result/coverage files against and to run tests from. | no | . |
| coverage-threshold | Coverage percentage boundary used for PASS/WARN/FAIL status and the per-file breakdown. | no | 80 |
| comment | Post (and update in place) a sticky PR comment with the report. | no | true |
| comment-marker | Hidden HTML marker that identifies the sticky comment. Use distinct markers to run multiple instances on one PR. | no | <!-- jest-pr-reporter --> |
| annotations | Post inline check-run annotations on failing test lines. | no | true |
| check-name | Name of the check run created for failure annotations. Keep it distinct from the job-level check required by branch protection. | no | Jest Failures |
| job-summary | Write the report to the Actions job summary. | no | true |
| fail-on-error | Fail the action (non-zero exit) when any test failed. | no | true |
| max-items | Maximum number of files / tests rendered in each collapsible section. | no | 20 |
Outputs
| name | description |
|---|---|
| success | true when all tests passed, false otherwise. |
| passed | Number of passing tests. |
| failed | Number of failing tests. |
| skipped | Number of skipped/todo tests. |
| total | Total number of tests. |
| coverage-pct | Overall coverage percentage (mean of statements/branches/functions/lines), or empty when no coverage. |
| duration | Test run duration in seconds, or "—" when unavailable. |