authentic2-cut/tox.ini

101 lines
2.3 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-cut/{env:BRANCH_NAME:}
envlist =
py3-dj22-drf3{9,12}
[tox:jenkins]
envlist =
py3-dj22-drf3{9,12}
check-migrations
code-style
pylint
[testenv]
setenv =
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
DJANGO_SETTINGS_MODULE=authentic2.settings
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
COVERAGE={tty::--junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=src/ --cov-config .coveragerc}
passenv=
BRANCH_NAME
# support for pg_virtualenv
PGPORT
PGHOST
PGUSER
PGPASSWORD
usedevelop = true
deps =
!local: https://git.entrouvert.org/authentic.git/snapshot/authentic-main.tar.gz
local: ../authentic2
# dependency constraints for authentic
py3: file-magic
drf39: djangorestframework>=3.9.2,<3.10
drf312: djangorestframework>=3.12,<3.13
dj22: django<2.3
django-tables<2.0
psycopg2-binary<2.9
oldldap: python-ldap<3
ldaptools
# pytest requirements
pytest
pytest-cov
pytest-django
pytest-freezegun
pytest-random
django-webtest
pyquery
commands =
py3: ./getlasso3.sh
./check-migrations.sh
py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/}
[testenv:check-migrations]
basepython = python3
usedevelop = True
setenv =
DJANGO_SETTINGS_MODULE=authentic2.settings
SETUPTOOLS_USE_DISTUTILS=stdlib
deps =
!local: https://git.entrouvert.org/authentic.git/snapshot/authentic-main.tar.gz
local: ../authentic2
psycopg2-binary
commands =
./getlasso3.sh
./check-migrations.sh
[testenv:code-style]
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:pylint]
usedevelop = true
basepython = python3
deps =
https://git.entrouvert.org/authentic.git/snapshot/authentic-main.tar.gz
Django<2.3
pylint<1.8
pylint-django<0.8.1
commands =
/bin/bash -c "./pylint.sh src/*/"
[pytest]
junit_family=xunit2
filterwarnings =
once
ignore:::django\..*
ignore:::authentic2\..*
ignore:::rest_framework\..*
ignore:::gettext\..*