Put update_coverage commands in the script called by tox

This commit is contained in:
Valentin Samir
2016-09-09 14:52:52 +02:00
parent 09e9b20c5b
commit ebfac168a2
2 changed files with 43 additions and 3 deletions

View File

@ -128,14 +128,17 @@ whitelist_externals={[post_cmd]whitelist_externals}
[testenv:coverage]
basepython=python
passenv=COVERAGE_TOKEN
passenv=
COVERAGE_TOKEN
CI_BUILD_REF_NAME
TRAVIS_BRANCH
TRAVIS_PULL_REQUEST
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
skip_install=True
commands=
py.test --cov=cas_server --cov-report term --cov-report html
bash -c 'cd {toxinidir}/htmlcov/; tar czf {toxinidir}/coverage.tar.gz ./'
bash -c 'curl -F "secret=$COVERAGE_TOKEN" -F "tar=@{toxinidir}/coverage.tar.gz" -F "project=django-cas-server" -F "branch=$(git rev-parse --abbrev-ref HEAD)" https://badges.genua.fr/local/coverage/; rm {toxinidir}/coverage.tar.gz'
{toxinidir}/.update_coverage "{toxinidir}" "django-cas-server"
{[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}