Set up combining on rspec and Grunt Karma tests
I am working on a project where we have both rspec tests covering Ruby code and we have installed JavaScript Karma modulation tests that run through a Grunt task.
I installed grunt-karma-coveralls and can get it to create local coverall.json on startup grunt test
and dryRun: true
. However, I'm not sure how to set up my Coveralls repo_token.
I also have a .coveralls.yml that successfully sends report for rspec tests to coveralls.
I'm not sure what, and how we can submit the coverage report for rspec and grunt-karma report to Coveralls.
- I can try setting COVERALLS_REPO_TOKEN as an ENV variable before starting
grunt test
, but would prefer to include it in the config somewhere - It is great if reports are displayed separately in Coveralls and not combined. I really would like to have separate coverage information for Ruby and JavaScript
- We use Codeship as our CI
Update
-
I now have a rake task that sets the repo token, does all npm and package settings, and runs the grunt checkout task.
-
I am also successfully submitting two separate reports to overalls
-
I would still like to know if the merging of coverage reports for JS package and Ruby package in Coveralls is successful.
-
I think I can do some Simplecov hacking and use Coveralls rakeball to pull out one consolidated report.
source to share
Not exactly what you asked, but I am merging the two JavaScript reports and submitting them in overalls. If you have a formatted coverage report lcov
, it doesn't matter if it's Ruby or Javascript.
This is for travis, but I assume the code is similar.
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
source to share