Skip to content

Commit

Permalink
submit coverage report to couverture.io
Browse files Browse the repository at this point in the history
  • Loading branch information
aconrad committed Feb 7, 2017
1 parent 748da13 commit 1845904
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1845904

Please sign in to comment.