tox.ini: adopt common targets

This commit is contained in:
Benjamin Dauvergne 2016-02-24 11:04:44 +01:00
parent 7b8555ce60
commit 95fcddbf9d
1 changed files with 37 additions and 13 deletions

50
tox.ini
View File

@ -3,17 +3,41 @@
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[testenv]
# django.contrib.auth is not tested it does not work with our templates
setenv=
DJANGO_SETTINGS_MODULE=settings
PYTHONPATH=src:tests
[testenv:coverage]
setenv =
DJANGO_SETTINGS_MODULE=settings
PYTHONPATH=tests
usedevelop = true
deps =
pytest
pytest-mock
pytest-django
pytest-cov
pytest-capturelog
commands =
py.test --cov=src/ tests {posargs}
usedevelop = True
deps = coverage
pytest
pytest-mock
pytest-django
pytest-cov
pytest-capturelog
py.test {posargs:--junit-xml=junit.xml --cov=src --cov-report xml --nomigrations tests}
[testenv:nocoverage]
setenv =
DJANGO_SETTINGS_MODULE=settings
PYTHONPATH=tests
deps =
pytest
pytest-mock
pytest-django
pytest-cov
pytest-capturelog
commands =
pip install -e ../authentic2
py.test {posargs:--nomigrations tests}
[testenv:package]
# eobuilder is not on pypi, too bad
deps = setuptools
pip<8
pyasn1
ndg-httpsclient
pyopenssl
commands =
pip install -U --find-links https://jenkins.entrouvert.org/packages/ eobuilder
sh -c "sudo -u eobuilder -E env HOME=/var/lib/eobuilder PATH=$PATH $VIRTUAL_ENV/bin/eobuilder-ctl -d wheezy,jessie `pwd`"