From af83756e5ed7b6cfc46a696dfcd3c7a444a4baf1 Mon Sep 17 00:00:00 2001 From: Jeremy Archer Date: Sat, 7 Apr 2018 21:03:08 -0400 Subject: [PATCH] Add support for Code Climate coverage --- circle.yml | 5 +++++ unit_tests.sh | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 62fe2b0..39af05e 100644 --- a/circle.yml +++ b/circle.yml @@ -3,8 +3,13 @@ dependencies: - curl -o ~/google_appengine_1.9.25.zip https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.25.zip - unzip -q -d ~ ~/google_appengine_1.9.25.zip - pip install -r requirements_dev.txt + - wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 + - chmod +x ./test-reporter-latest-linux-amd64 test: override: + - ./test-reporter-latest-linux-amd64 before-build - coverage run --source=caravel $(which nose2) --log-capture --plugin nose2.plugins.doctests --with-doctest - coveralls || true + - ./test-reporter-latest-linux-amd64 before-build + diff --git a/unit_tests.sh b/unit_tests.sh index ae4399f..176646b 100755 --- a/unit_tests.sh +++ b/unit_tests.sh @@ -8,6 +8,11 @@ else source venv/bin/activate fi +CC_TEST_REPORTER_ID=189ccc50fd525bc8cfca2bebf76da4b6051536a23746618cdab6946c14501893 ./test-reporter-latest-darwin-amd64 before-build + coverage run --source=caravel $(which nose2) --log-capture \ --plugin nose2.plugins.doctests --with-doctest -coverage report \ No newline at end of file +coverage report +coverage xml + +CC_TEST_REPORTER_ID=189ccc50fd525bc8cfca2bebf76da4b6051536a23746618cdab6946c14501893 ./test-reporter-latest-darwin-amd64 after-build --exit-code 0 -t coverage.py