diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-08-04 20:55:17 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-08-05 13:43:44 +0200 |
commit | 068f3c95b04f58d222ca5d8e691ed474c04c4754 (patch) | |
tree | 8b1eff8d0ce9806a3c5f447b6a83716f7ea7df1c /.travis.yml | |
parent | 1008f595b859cc769da755f92a5f39930bc35117 (diff) |
travis: generate coverage report
Generate a coverage report and upload it to codacy.com.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 13 |
1 files changed, 12 insertions, 1 deletions
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: |