coverage-diff-back
v0.1.0
Published
Send the coverage difference back to the github on each pull requests
Downloads
4
Maintainers
Readme
coverage-diff-back
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
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.
CIRCLECI_TOKEN
: A CircleCI personal API tokenGITHUB_TOKEN
: A Github personal access token withrepo
andgist
scope
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
- Fork this repository
- Write your code
- Run tests
- Create pull request to master branch
Development
git clone [email protected]:Leko/coverage-diff-back.git
cd coverage-diff-back
npm i
License
This package under MIT license.