Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 924 Bytes

setup-coveralls.md

File metadata and controls

34 lines (24 loc) · 924 Bytes

Integrating with coveralls.io

coveralls.io is a great tool for adding coverage reports to your GitHub project. Here's how to get nyc integrated with coveralls and travis-ci.org:

  1. add the coveralls and nyc dependencies to your module:
npm install coveralls nyc --save-dev
  1. update the scripts in your package.json to include these bins:
{
   "scripts": {
     "test": "nyc mocha",
     "coverage": "nyc report --reporter=text-lcov | coveralls"
   }
}
  1. For private repos, add the environment variable COVERALLS_REPO_TOKEN to travis.

  2. add the following to your .travis.yml:

after_success: npm run coverage

That's all there is to it!

Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck LEAVE COMMENTS?.