4

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

4

1 回答 1

4

我在我的 yml 文件中使用以下内容。它从 karma 和 mocha 中连接 lcov,然后将它们发送出去。

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
于 2014-09-18T02:12:07.827 回答