coveralls.io

Posts your coverage reports to coveralls.io. Optimized for TravisCI, Codeship.io and local builds

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
coveralls.io
1,065762.1.011 years ago11 years agoMinified + gzip package size for coveralls.io in KB

Readme

node-coveralls
Codeship Status for xcambar/node-coveralls Coverage status
Coveralls.io support for node.js. Get the great coverage reporting of coveralls.io and add a cool coverage button to your README.
Usage
  • Add the latest version of coveralls to your package.json:
npm install coveralls --save
JSCover, node-jscoverage or any tool of your choosing
  • Run your test suites against the instrumented files, with Istanbul,
the Mocha LCOV Reporter, or, once again, the tool of your choosing
  • Run \npm bin\`/coveralls.js < /path/to/your/lcov\_report.info`

coveralls.io require the presence of an environment variable called COVERALLS\_REPO\_TOKEN,
whic contains the secret token to post your coverage data. Make sure it is available in your Ci environment, or the whole bild will fail (node-coveralls will stop with a non-zero return code).
Setup example
In this repo, I used Istanbul and Mocha, and wrapped them all in the following npm scripts:
"scripts": {
  "test": "node ./test/runner.js",
  "coverage": "`npm bin`/istanbul cover ./test/runner.js",
  "coveralls": "npm run-script coverage && node bin/coveralls.js < coverage/lcov.info"
}

The Ci environments they run into execute the task coveralls to send the data once the build is finished.

Supported CIs

Currently, node-coveralls can send data from 3 CI environments:

The two first offer a great level of integration, the third os yet to be polished, though the major info is available.

More CIs ?

Feel free to pull-request the integration of another CI, or simply ask, it may be just enough to see it implemented :wink:.
Roadmap
  • More CIs
  • Polish
  • Enhnce code coverage (of course!)
Licence
MIT