I'm trying to get CodeClimate's code coverage to work on my GitHub Repo. Travis CI doesn't find the lcov.info file that is generated by Karma after testing. I tried using a glob like this answer but even codeclimate-test-reporter < **/*lcov.info
doesn't work.
Karma generates the lcov.info
file in /coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info
. I've set the token environment variable in Travis CI and locally.
Running this locally works:
codeclimate-test-reporter < "coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info"
Running it in Travis CI via .travis.yml does not work. Travis CI can't find the file.
Karma.conf.js
coverageReporter: {
type : 'lcovonly',
dir : 'coverage/'
}
.travis.yml
language: node_js
node_js:
- "0.12"
- "0.11"
- "0.10"
- "iojs"
after_script:
- npm install codeclimate-test-reporter
- codeclimate-test-reporter < **/*lcov.info
So whats the deal? Is karma not generating the file before Travis CI tries to access it? Is it getting generated in some other directory? Any help is appreciated!