coverage-diff-back

0.1.0 • Public • Published

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.

Package Sidebar

Install

npm i coverage-diff-back

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

37.5 kB

Total Files

12

Last publish

Collaborators

  • lekoleko