Skip to content
Send the coverage difference back to the github on each pull requests
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
__tests__
src
.babelrc
.gitignore
.prettierrc
LICENSE
README.md
commitlint.config.js
jest.config.js
package-lock.json
package.json
tsconfig.json

README.md

coverage-diff-back

CircleCI

Send the coverage difference back to the github on each pull requests

  • Report coverage diff on every pull request
  • Update GitHub commit status
  • Monorepo ready

Update GitHub commit status

Report coverage diff on every pull request

TOC


Supported services

Is there anything you want from these?
Please contribute or create a issue.

Install

npm install -g coverage-diff-back

Or you can use coverage-diff-back with npx without npx install.

npx coverage-diff-back

Usage

Common setup

Please add json-summary to coverage reporters.
If you use jest, please refer here.
Or if you use nyc(istanbul), please refer here.

CI Setup

CircleCI

Please add store_artifacts step after your test step.
And then, set environment variables.

Optional: Turn on the Only build pull requests in Advanced Settings (if you needed).

Working example is here.

Command-line usage

Usage: coverage-diff-back [options]

Options:
  --help           Show help                                                     [boolean]
  --version        Show version number                                           [boolean]
  --coverage-glob  A glob pattern to specify path of coverage-summary.json
                                   [string] [default: "**/coverage/coverage-summary.json"]
  --from           Compare branch                             [string] [default: "master"]
  --status         Update commit status                                          [boolean]

Examples:
  coverage-diff-back --no-status     # Doesn't update commit status
  coverage-diff-back --from develop  # Compare between develop and current pull request

Contribution

  1. Fork this repository
  2. Write your code
  3. Run tests
  4. Create pull request to master branch

Development

git clone git@github.com:Leko/coverage-diff-back.git
cd coverage-diff-back
npm i

License

This package under MIT license.

You can’t perform that action at this time.