我正在努力让CodeClimate的代码覆盖在我的GitHub回购上工作。Travis没有找到测试后由Karma生成的lcov.info文件。我试过使用像这答案这样的单词,但即使是codeclimate-test-reporter < **/*lcov.info
也不起作用。
Karma在lcov.info
中生成/coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info
文件。我已经在Travis CI和本地设置了令牌环境变量。
在本地运行此操作可以:
codeclimate-test-reporter < "coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info"
通过.travis.yml在Travis中运行它不起作用。特拉维斯·CI找不到文件。
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
那怎么回事?业力不是在Travis CI试图访问它之前生成文件吗?它是否在其他目录中生成?任何帮助都是非常感谢的!
发布于 2015-07-30 11:39:26
只需要全局安装codeclimate-test-reporter
,而不是本地安装
https://stackoverflow.com/questions/31731414
复制