jeudi 30 juin 2016

How do I integrate travis ci with codeclimate test coverage in Python?

I'm trying to make my Travis CI send test coverage data to Code Climate service, but documentation on Code Climate and Travis CI do not describe in detail how to do this using Python. Still its supported feature according Code Climate and Travis documentations. I've tried to find any working examples on this without luck and can't make it work on my own.

Code Climate documentation: Setting Up Test Coverage, Readme: codeclimate-test-reporter

Travis CI documentation: Using Code Climate with Travis CI

I've set the CODECLIMATE_REPO_TOKEN in Travis CI as described in this answer: http://stackoverflow.com/a/31281481/1754089

My .travis.yml file:

language: python
python:
  - 2.7
install:
  - pip install -r requirements.txt
  - pip install coverage
  - pip install codeclimate-test-reporter
#commands to run tests:
script:
  - python mytests.py
  - coverage run mytests.py
after_success:
  - codeclimate-test-reporter

as the after_success line is excecuted in Travis it gives me this in log-view:

/home/travis/build.sh: line 45: codeclimate-test_reporter: command not found

Aucun commentaire:

Enregistrer un commentaire