Supplies a script which accepts lcov data over standard input, formats the coverage data and sends it to Code Climate.
Code Climate - https://codeclimate.com
This npm package requires having a user (but not necessarily a paid account) on Code Climate, so if you don't have one the first step is to create an account at: https://codeclimate.com. Then:
-
Generate coverage data in Lcov format
Lcov data can be generated by a number of JavaScript code coverage tools, including instanbul.
-
Install codeclimate's NPM package
$ npm install -g codeclimate-test-reporter
-
Specifying your repo token as an environment variable, pipe lcov coverage data to the codeclimate npm script.
For example, if your coverage data resides in a "lcov.info" file:
CODECLIMATE_REPO_TOKEN=ABCD11110000000 cat lcov.info | codeclimate
The CODECLIMATE_REPO_TOKEN
value is provided after you add your repo to your
Code Climate account by clicking on "Setup Test Coverage" on the right hand side of your feed.
Please contact hello@codeclimate.com if you need any assistance setting this up.
Patches, bug fixes, feature requests, and pull requests are welcome on the GitHub page for this project: https://github.com/codeclimate/javascript-test-reporter
See LICENSE.txt