summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-03-01 12:31:44 +0100
committerDaniel Hahler <git@thequod.de>2019-03-01 13:02:25 +0100
commite5572e95aaf08e4ee88e4ddcec38b0906d87741b (patch)
tree0ed6244a5d10190825a06862fbc8436651a57e0c /.travis.yml
parentf0badf18389935b0275660f8f3ef9899dc4c4f49 (diff)
downloadisort-e5572e95aaf08e4ee88e4ddcec38b0906d87741b.tar.gz
Report coverage
- add coverage factor to tox - report coverage to codecov.io - configure testpaths for pytest, instead of passing it through tox command
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml20
1 files changed, 16 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 9c711d42..1fbffbab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,16 +11,28 @@ matrix:
- python: 3.7
env: TOXENV=mypy
- python: 3.4
- env: TOXENV=py34
+ env: TOXENV=py34-coverage
- python: 3.5
- env: TOXENV=py35
+ env: TOXENV=py35-coverage
- python: 3.6
- env: TOXENV=py36
+ env: TOXENV=py36-coverage
- python: 3.7
- env: TOXENV=py37
+ env: TOXENV=py37-coverage
- python: pypy3.5-6.0
env: TOXENV=pypy3
install:
- pip install tox
script:
- tox
+after_success:
+ - |
+ # Report coverage for TOXENV=*-coverage.
+ if [[ "${TOXENV%-coverage}" != "$TOXENV" ]]; then
+ set -e
+ # Add last TOXENV to $PATH.
+ PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
+ coverage xml
+ coverage report -m
+ bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -n $TOXENV
+ set +e
+ fi