Merge pull request #1456 from aconrad/couverture-io

submit coverage report to couverture.io
This commit is contained in:
Benoit Chesneau 2017-02-09 14:51:25 +01:00 committed by GitHub
commit 34a624ff59
3 changed files with 19 additions and 1 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ setuptools-*
*.egg-info
nohup.out
.coverage
coverage.xml
examples/frameworks/pylonstest/PasteScript*
examples/frameworks/pylonstest/pylonstest.egg-info/
examples/frameworks/django/testing/testdb.sql

View File

@ -27,3 +27,20 @@ cache:
directories:
- .tox
- $HOME/.cache/pip
after_script:
- |
if [ ! -f coverage.xml ]; then
echo "No coverage.xml found; skipping sending coverage to couverture.io"
return
fi
if [ $TRAVIS_PULL_REQUEST != false ]; then
REAL_COMMIT=$(git log -n 1 $TRAVIS_COMMIT_RANGE --format="%H")
PR_NUM=$TRAVIS_PULL_REQUEST
else
REAL_COMMIT=$TRAVIS_COMMIT
fi
curl \
--verbose \
--header "X-Couverture-Pull-Request: $PR_NUM" \
--data-binary @coverage.xml \
"https://app.couverture.io/coverage/github/benoitc/gunicorn/$REAL_COMMIT/$TOXENV"

View File

@ -7,7 +7,7 @@ group = System Environment/Daemons
[tool:pytest]
norecursedirs = examples lib local src
testpaths = tests/
addopts = --assert=plain
addopts = --assert=plain --cov=gunicorn --cov-report=xml
[wheel]
universal = 1