我已将codecov配置到我的NodeJS应用程序。
当我运行npm run codecov --disable=gcov
时,它将生成报告,并且可以看到结果。但是在我的TravisCI版本中,我在日志中收到一条消息,内容为
==> Scanning for reports
X Failed to read file at
这是我的package.json的样子。
"report-coverage": "nyc report --reporter=text-lcov --recursive \"./spec/**/*.spec.js\" > coverage.lcov && codecov",
"coverage": "codecov --disable=gcov"
这里是package.json
这里是TravisCI build log的链接。
是因为我没有在npm run test
之前运行npm run coverage
因此,我已按照以下方式更改了travis.yml中的after_success:
:
after_success: npm run test && npm run coverage