为什么Travis CI不会为我的Node应用程序运行CodeClimate脚本?

Set*_*eth 1 travis-ci code-climate

我按照说明将CodeClimate添加到我的.travis.yml文件中:

language: node_js
script:
  - gulp
  - npm test
after_script:
  - codeclimate < coverage/**/lcov.info
addons:
  code_climate:
    repo_token: [ my token ]
Run Code Online (Sandbox Code Playgroud)

我的构建中的所有内容都运行没有错误,除了最后的codeclimate脚本:

[0K$ codeclimate < coverage/**/lcov.info
/home/travis/build.sh: line 41: codeclimate: command not found
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

jed*_*mao 6

我将我添加CODECLIMATE_REPO_TOKEN到了Travis-CI > Settings > Environment Variables我的.travis.yml文件中并将其删除.

如果构建失败(性能),我不希望它安装,所以我只在我的.travis.yml文件中成功安装它,如下所示:

after_success:
  - npm install codeclimate-test-reporter
  - codeclimate-test-reporter < coverage/lcov.info
Run Code Online (Sandbox Code Playgroud)

我认为codeclimate-test-reporter二进制从更名codeclimatecodeclimate-test-reporter,也许特拉维斯-CI没有注意到这个变化呢.这一定是为什么突然间它被打破了(我有同样的问题).