gpt4 book ai didi

javascript - Travis CI 找不到 Karma 生成的 lcov.info 文件

转载 作者:行者123 更新时间:2023-11-28 00:01:46 30 4
gpt4 key购买 nike

我正在尝试让 CodeClimate 的代码覆盖率发挥作用 my GitHub Repo 。 Travis CI 测试后未找到 Karma 生成的 lcov.info 文件。我尝试使用像 this 这样的 glob回答但甚至codeclimate-test-reporter < **/*lcov.info不起作用。

karma 生成lcov.info文件在 /coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info 。我已在 Travis CI 和本地设置了 token 环境变量。

在本地运行它可以工作:

codeclimate-test-reporter < "coverage/PhantomJS 1.9.8 (Windows 7 0.0.0)/lcov.info"

通过 .travis.yml 在 Travis CI 中运行它不起作用。 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

所以这是怎么回事?在 Travis CI 尝试访问该文件之前,karma 是否未生成该文件?它是在其他目录中生成的吗?如有任何帮助,我们将不胜感激!

最佳答案

只需要全局安装codeclimate-test-reporter而不是本地

关于javascript - Travis CI 找不到 Karma 生成的 lcov.info 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31731414/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com