From cb8d53fd100e14dbb564f22bff8ec94868371e1a Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 10 Dec 2018 21:02:05 -0800 Subject: [PATCH] Add code climate --- .travis.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 846a502..e0debab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,24 @@ sudo: false language: python +env: + global: + - CC_TEST_REPORTER_ID=b6726c411af063deb7dae6670a83c2a0be6bf453a58298f419bac4c25dba6ad9 + +before_script: # code coverage tool + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + - chmod +x ./cc-test-reporter + - ./cc-test-reporter before-build + +# command to run tests and save coverage +script: + - py.test --cov cached_property + +after_script: + - coverage report -m + - coverage xml + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT + python: - "3.6" - "3.5" @@ -17,6 +35,3 @@ matrix: # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: pip install -r requirements.txt - -# command to run tests, e.g. python setup.py test -script: pytest tests/ -- 2.30.2