Skip to content
git-pull-request

GitHub Action

Jest Coverage Reporter Action

v2.0.0 Latest version

Jest Coverage Reporter Action

git-pull-request

Jest Coverage Reporter Action

Provide a coverage report based on a base/master coverage report

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Jest Coverage Reporter Action

uses: adRise/jest-cov-reporter@v2.0.0

Learn more about this action in adRise/jest-cov-reporter

Choose a version

jest-coverage-reporter

A simple coverage reporter for jest which compares json-summary reports for a base branch to the current branch

Screenshots

Success Screenshot success

Failure Screenshot failure

Usage

- 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

Options

  1. base-coverage-report-path: Path to base coverage report. Required.
  2. branch-coverage-report-path: Path to the current coverage report. Required.
  3. accessToken: access token required to comment on a pr. Defaults to ${{ github.token }}
  4. fullCoverageDiff: get the full coverage with diff or only the diff. Defaults to false
  5. delta: Difference between the old and final test coverage. Defaults to 0.2
  6. useSameComment: While commenting on the PR update the exisiting comment. Defaults to true.
  7. coverageType: Tools that generate code coverage, only support 'jest' and 'cobertura' for now.