A simple coverage reporter for jest which compares json-summary reports for a base branch to the current branch
- name: Coverage
uses: adRise/jest-cov-reporter@main
with:
branch-coverage-report-path: ./coverage/coverage-summary.json
base-coverage-report-path: ./coverage/master-coverage-summary.json
delta: 0.3
accessToken: <GITHUB_TOKEN>
fullCoverageDiff: true
useSameComment: true
base-coverage-report-path
: Path to base coverage report. Required.branch-coverage-report-path
: Path to the current coverage report. Required.accessToken
: access token required to comment on a pr. Defaults to ${{ github.token }}fullCoverageDiff
: get the full coverage with diff or only the diff. Defaults to falsedelta
: Difference between the old and final test coverage. Defaults to 0.2useSameComment
: While commenting on the PR update the exisiting comment. Defaults to true.coverageType
: Tools that generate code coverage, only support 'jest' and 'cobertura' for now.