tox.ini: refactor, add dj22 target
This commit is contained in:
parent
01ee94e541
commit
c4a0b3cde7
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
set -e -x
|
|
||||||
env
|
|
||||||
if [ -f /var/lib/jenkins/pylint.django.rc ]; then
|
if [ -f /var/lib/jenkins/pylint.django.rc ]; then
|
||||||
PYLINT_RC=/var/lib/jenkins/pylint.django.rc
|
PYLINT_RC=/var/lib/jenkins/pylint.django.rc
|
||||||
elif [ -f pylint.django.rc ]; then
|
elif [ -f pylint.django.rc ]; then
|
||||||
|
@ -10,4 +10,4 @@ else
|
||||||
echo No pylint RC found
|
echo No pylint RC found
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
pylint -f parseable --rcfile ${PYLINT_RC} "$@" | tee pylint.out || /bin/true
|
pylint -f parseable --rcfile ${PYLINT_RC} "$@" > pylint.out || /bin/true
|
||||||
|
|
94
tox.ini
94
tox.ini
|
@ -6,49 +6,71 @@
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-auth-kerberos/
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-auth-kerberos/
|
||||||
envlist = py27-coverage-dj111{-oldldap,},py3-coverage-dj111,pylint
|
envlist =
|
||||||
|
py2-dj111-drf34
|
||||||
|
py2-dj111-drf34-oldldap
|
||||||
|
py3-dj111-drf34
|
||||||
|
py3-dj22-drf39
|
||||||
|
|
||||||
|
[tox:jenkins]
|
||||||
|
envlist =
|
||||||
|
pylint
|
||||||
|
py2-dj111-drf34
|
||||||
|
py3-dj111-drf34
|
||||||
|
py3-dj22-drf39
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals =
|
|
||||||
/bin/mv
|
|
||||||
/bin/rm
|
|
||||||
setenv =
|
setenv =
|
||||||
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
||||||
DJANGO_SETTINGS_MODULE=authentic2.settings
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
||||||
DB_ENGINE=postgresql_psycopg2
|
DB_ENGINE=postgresql_psycopg2
|
||||||
|
|
||||||
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
||||||
coverage: COVERAGE=--cov=src --cov-branch --cov-append --cov-report xml --cov-report html
|
COVERAGE={tty::--junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=src/ --cov-config .coveragerc}
|
||||||
|
passenv=
|
||||||
# support for pg_virtualenv
|
BRANCH_NAME
|
||||||
PGPORT={env:PGPORT:}
|
# support for pg_virtualenv
|
||||||
PGHOST={env:PGHOST:}
|
PGPORT
|
||||||
PGUSER={env:PGUSER:}
|
PGHOST
|
||||||
PGPASSWORD={env:PGPASSWORD:}
|
PGUSER
|
||||||
usedevelop =
|
PGPASSWORD
|
||||||
coverage: true
|
usedevelop = true
|
||||||
deps =
|
deps =
|
||||||
dj111: django>1.11,<1.12
|
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.gz
|
||||||
dj111: django-tables<2.0
|
# dependency constraints for authentic
|
||||||
psycopg2-binary
|
py2: django-appconf<1.0.4
|
||||||
pytest>=3.3.0
|
py2: django-filter<2
|
||||||
pytest-cov
|
drf34: djangorestframework>=3.4,<3.4.1
|
||||||
pytest-random
|
drf39: djangorestframework>=3.9.2,<3.10
|
||||||
pytest-django
|
dj111: django<2.0
|
||||||
ldaptools
|
dj22: django<2.3
|
||||||
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.bz2
|
django-tables<2.0
|
||||||
oldldap: python-ldap<3
|
psycopg2-binary
|
||||||
django-webtest
|
oldldap: python-ldap<3
|
||||||
py27: django-appconf<1.0.4
|
ldaptools
|
||||||
|
|
||||||
|
# pytest requirements
|
||||||
|
pytest
|
||||||
|
pytest-cov
|
||||||
|
pytest-django
|
||||||
|
pytest-random
|
||||||
|
django-webtest
|
||||||
|
pyquery
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
py27: ./getlasso.sh
|
py2: ./getlasso.sh
|
||||||
py3: ./getlasso3.sh
|
py3: ./getlasso3.sh
|
||||||
py.test {env:COVERAGE:} {env:JUNIT:} {posargs:tests}
|
py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/}
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python2.7
|
skip_install = True
|
||||||
deps =
|
deps =
|
||||||
pylint<1.8
|
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.gz
|
||||||
pylint-django<0.8.1
|
Django<2.3
|
||||||
|
pylint
|
||||||
|
pylint-django
|
||||||
commands =
|
commands =
|
||||||
pylint: ./pylint.sh src/authentic2_auth_kerberos/
|
/bin/bash -c "./pylint.sh src/*/"
|
||||||
|
|
||||||
|
[pytest]
|
||||||
|
junit_family=xunit2
|
||||||
|
|
Loading…
Reference in New Issue