Code Coverage Danger JS plugin
Description
This plugin analyzes your last pull request, and displays the code coverage on the new files and modified files you just wrote
Installation
You need to install Danger JS first:
yarn add -D danger
Then add this package
yarn add -D code-coverage-dangerjs-plugin
Usage
- Create a dangerfile (dangerfile.js or dangerfile.ts at the root of your project folder)
- Edit it with
; ;
- Run locally to test if it works
yarn danger local
You should see some lines in your terminal
-
Run with your Continuous Integration system:
- Follow the steps described in the "Setting up Danger to run on your CI" section of the GETTING STARTED WITH DANGER JS page
- Generate a new GitHub Token
- Add it in your CI environment
Example for Circle CI:
version: 2jobs:build: steps: - run: ... YOUR OTHER STEPS ... - run: name: Run Danger command: yarn danger ci environment: DANGER_GITHUB_API_TOKEN: YOUR_GITHUB_TOKEN
- Push a new PR and run the CI on it.
- Go see your pull request with a useful comment!
- ⭐️Add a star on this repo if you like it ;)