authentic2-wallonie-connect/tox.ini

88 lines
2.5 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-wallonie-connect/{env:BRANCH_NAME:}
envlist =
py3-dj32
[tox:jenkins]
envlist =
pylint
py3-dj32
[testenv]
setenv =
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
DJANGO_SETTINGS_MODULE=authentic2.settings
DB_ENGINE=django.db.backends.postgresql_psycopg2
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}
SETUPTOOLS_USE_DISTUTILS=stdlib
passenv=
BRANCH_NAME
# support for pg_virtualenv
PGPORT
PGHOST
PGUSER
PGPASSWORD
usedevelop = True
deps =
pip > 9
https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
# dependency constraints for authentic
djangorestframework>=3.12,<3.13
django<3.3
django-tables2==2.4.1
psycopg2-binary
django-filter
chardet<4
# pytest requirements
pytest
pytest-cov
pytest-django
django-webtest
pyquery
allowlist_externals =
./getlasso3.sh
commands =
./getlasso3.sh
py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/}
[testenv:pylint]
usedevelop = true
deps =
https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
django<3.3
pylint<3
astroid<3
pylint-django
psycopg2-binary
allowlist_externals =
./getlasso3.sh
commands =
./getlasso3.sh
./pylint.sh src/*/
[pytest]
junit_family=xunit2
filterwarnings =
error
# there is nothing we can do about that
ignore:defusedxml.lxml is no longer supported:DeprecationWarning:openpyxl.xml.functions
ignore:Using or importing the ABCs from 'collections':DeprecationWarning:django.*
ignore:Role QuerySet won't use Meta.ordering::django\..*
ignore:Using user.is_authenticated\(\) and user.is_anonymous\(\) as a method is deprecated.::rest_framework\.*
ignore:Rendering.*raised KeyError::django\.template\.loader_tags
# warning of gettext() when using Django 1.11 with Python 3.8
ignore:set_output_charset\(\) is deprecated::django.utils.translation.trans_real
ignore:parameter codeset is deprecated::django.utils.translation.trans_real
# warning in markdown
ignore:'version' is deprecated. Use '__version__' instead
# remind us later
once:.*staticfiles.*::django\..*
once