Search code examples
travis-cicode-climate

Why won't Travis CI run the CodeClimate script for my Node app?


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 ]

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

What am I missing?


Solution

  • I got this working by installing CodeClimate locally:

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

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