为什么 Travis CI 不会为我的 Node 应用程序运行 CodeClimate 脚本? [英] Why won't Travis CI run the CodeClimate script for my Node app?

查看:39
本文介绍了为什么 Travis CI 不会为我的 Node 应用程序运行 CodeClimate 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have followed the instructions to add CodeClimate to my .travis.yml file:

language: node_js
script:
  - gulp
  - npm test
after_script:
  - codeclimate < coverage/**/lcov.info
addons:
  code_climate:
    repo_token: [ my token ]

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

Everything in my build runs without error, except the codeclimate script at the end:

[0K$ codeclimate < coverage/**/lcov.info
/home/travis/build.sh: line 41: codeclimate: command not found

我错过了什么?

推荐答案

我通过在本地安装 CodeClimate 来解决这个问题:

I got this working by installing CodeClimate locally:

npm install --save-dev codeclimate-test-reporter

我猜 Travis CI 的 Code Climate 插件不起作用,或者我只是没有正确指定它.

I guess Travis CI's Code Climate addon isn't working, or I'm just not specifying it correctly.

这篇关于为什么 Travis CI 不会为我的 Node 应用程序运行 CodeClimate 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆