use tox to test with django 1.7 and 1.8 and run it by jenkins (#10191)

This commit is contained in:
Serghei Mihai 2016-03-03 17:16:54 +01:00
parent 5aa3eef46b
commit 205c309fd4
2 changed files with 29 additions and 7 deletions

View File

@ -5,18 +5,12 @@ rm -f test_results.xml
export PIP_USE_WHEEL=no
pip install --upgrade 'pip<8'
pip install --upgrade pylint==1.4.0 astroid==1.3.2 # 1.4.1 is buggy
pip install --upgrade -r requirements.txt
pip install --upgrade pytest pytest-django pytest-cov mock
pip install --upgrade WebTest==2.0.16
rm -f passerelle.sqlite3
./manage.py migrate
./manage.py validate
DJANGO_SETTINGS_MODULE=passerelle.settings \
PASSERELLE_SETTINGS_FILE=tests/settings.py \
py.test --junitxml=test_results.xml --cov-report xml --cov=passerelle/ --cov-config .coveragerc tests/
tox -r
test -f pylint.out && cp pylint.out pylint.out.prev
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc passerelle/ | tee pylint.out) || /bin/true

28
tox.ini Normal file
View File

@ -0,0 +1,28 @@
[tox]
envlist = django17,django18
[testenv]
usedevelop = True
sitepackages = True
setenv =
DJANGO_SETTINGS_MODULE=passerelle.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
commands =
py.test --junitxml=test_results.xml --cov-report xml --cov=passerelle/ --cov-config .coveragerc tests/
deps =
django17: django>1.7,<1.8
django18: django>=1.8,<1.9
requests
SOAPpy
phpserialize
suds
pytest-cov
pytest-django
pytest
WebTest
mock
django-jsonfield >= 0.9.3
django-model-utils
pylint==1.4.0
astroid==1.3.2
django-jsonresponse