From 068f3c95b04f58d222ca5d8e691ed474c04c4754 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 4 Aug 2017 20:55:17 +0200 Subject: travis: generate coverage report Generate a coverage report and upload it to codacy.com. --- .travis.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 02428227..502671b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,6 +61,9 @@ before_install: | # Install the python bindings. cd bindings/python pip install . + # Install the coverage programs to generate a coverage report and upload + # it to codacy.com + pip install coverage codacy-coverage # Move out of the notmuch dir again. cd ../../.. fi @@ -109,7 +112,15 @@ script: | make -C docs html SPHINXBUILD='sphinx-build -W' else alot --config conf - python setup.py test + coverage run setup.py test + fi + +after_success: | + set -e + if [[ $JOB = tests ]]; then + coverage xml + export CODACY_PROJECT_TOKEN=df4443e7313e4ae599bcbbaf4835b00f + python-codacy-coverage -r coverage.xml fi notifications: -- cgit v1.2.3