Question

I have several open-source projects that use Travis-CI to check the build status on my commits. I also report my test coverage to Coveralls.io. In the past few weeks, the reliability of coveralls has been spotty at best, and I had my tests running the coverage stuff, but they would fail the build because the coveralls api was returning a 503 error.

In response to this, I moved my coverage stuff to an after_success script in my .travis.yml, but now it seems that it's not sending the info to Coveralls.io. Am I approaching this the wrong way? Has anyone else run into this issue?

Here are some more details on the projects I'm running into issues with:

  • all of them are node modules
  • all of them are tested using mocha
  • all of them have test coverage using istanbul
  • I am using the node-coveralls module to report coverage reports to coveralls.io

If more information is needed, please let me know.

UPDATE:

Now it seems to be reporting correctly to coveralls, but it's only reporting 50%. Any additional help would be much appreciated

Was it helpful?

Solution

I use the following in my yml file. It concats the lcovs from karma and mocha, then sends them along.

after_script: 
- ./node_modules/karma/bin/karma start
- istanbul cover ./node_modules/mocha/bin/_mocha server/api/**/*.spec.js
- cat ./coverage/lcov.info ./coverage/karma/**/*.info > lcov.info 
- node node_modules/lcov-filter/index.js lcov.info config | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top