jenkins: use tox.ini to run tests
This commit is contained in:
parent
62b2856181
commit
aabe7e62b0
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
pip install --upgrade setuptools
|
pip install --upgrade setuptools
|
||||||
pip install --upgrade 'pip<8'
|
pip install --upgrade pip
|
||||||
pip install --editable .
|
pip install tox
|
||||||
pip install --upgrade 'pylint<1.8' 'pylint-django<0.9' pytest pytest-cov pytest-django pytest-mock 'django<2' django-webtest httmock
|
|
||||||
pip install --upgrade WebTest==2.0.16
|
|
||||||
|
|
||||||
DJANGO_SETTINGS_MODULE=welco.settings py.test --junitxml=test_results.xml --cov-report xml --cov=welco/ tests/
|
tox -r
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
[tox]
|
||||||
|
envlist = coverage-{django18,django111}
|
||||||
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/welco/
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
usedevelop =
|
||||||
|
coverage: True
|
||||||
|
setenv =
|
||||||
|
DJANGO_SETTINGS_MODULE=welco.settings
|
||||||
|
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
||||||
|
fast: FAST=--nomigrations
|
||||||
|
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov=welco/
|
||||||
|
deps =
|
||||||
|
django18: django>=1.8,<1.9
|
||||||
|
django111: django>=1.11,<1.12
|
||||||
|
pytest-cov
|
||||||
|
pytest-django
|
||||||
|
pytest
|
||||||
|
WebTest
|
||||||
|
mock
|
||||||
|
httmock
|
||||||
|
python-dateutil
|
||||||
|
pylint<1.8
|
||||||
|
pylint-django<0.9
|
||||||
|
django-webtest
|
||||||
|
pyquery
|
||||||
|
lxml
|
||||||
|
commands =
|
||||||
|
py.test {env:FAST:} {env:COVERAGE:} {posargs:tests/}
|
Loading…
Reference in New Issue