authentic2-cut/tox.ini

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

123 lines
2.6 KiB
INI
Raw Permalink Normal View History

2018-09-27 15:53:28 +02:00
# 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:}
2020-05-15 16:01:06 +02:00
envlist =
2023-03-16 12:20:10 +01:00
py3-dj32
2020-05-15 16:01:06 +02:00
[tox:jenkins]
envlist =
2023-03-16 12:20:10 +01:00
py3-dj32
2022-02-07 18:30:08 +01:00
check-migrations
code-style
pylint
2020-05-15 16:01:06 +02:00
2018-09-27 15:53:28 +02:00
[testenv]
setenv =
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
DJANGO_SETTINGS_MODULE=authentic2.settings
2020-05-15 16:01:06 +02:00
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
2018-09-27 15:53:28 +02:00
deps =
!local: https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
local: ../authentic
2020-05-15 16:01:06 +02:00
# dependency constraints for authentic
py3: file-magic
dj32: django>=3.2.12,<3.3
2023-03-16 12:20:10 +01:00
djangorestframework>=3.12,<3.13
django-tables2==2.4.1
psycopg2-binary
2020-05-15 16:01:06 +02:00
oldldap: python-ldap<3
ldaptools
Markdown<3
2020-05-15 16:01:06 +02:00
# pytest requirements
2018-09-27 15:53:28 +02:00
pytest
2020-05-15 16:01:06 +02:00
pytest-cov
pytest-django
pytest-freezegun
2020-05-15 16:01:06 +02:00
pytest-random
django-webtest
pyquery
allowlist_externals =
./getlasso3.sh
./check-migrations.sh
2018-09-27 15:53:28 +02:00
commands =
py3: ./getlasso3.sh
2020-05-15 16:16:23 +02:00
./check-migrations.sh
2020-05-15 16:01:06 +02:00
py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/}
2022-02-07 18:30:08 +01:00
[testenv:check-migrations]
basepython = python3
usedevelop = True
setenv =
DJANGO_SETTINGS_MODULE=authentic2.settings
SETUPTOOLS_USE_DISTUTILS=stdlib
deps =
!local: https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
local: ../authentic
2022-02-07 18:30:08 +01:00
psycopg2-binary
allowlist_externals =
./getlasso3.sh
./check-migrations.sh
2022-02-07 18:30:08 +01:00
commands =
./getlasso3.sh
./check-migrations.sh
2022-08-01 15:40:21 +02:00
[testenv:manage]
basepython = python3
usedevelop = True
setenv =
DJANGO_SETTINGS_MODULE=authentic2.settings
SETUPTOOLS_USE_DISTUTILS=stdlib
deps =
../authentic
psycopg2-binary
django<3
allowlist_externals =
./getlasso3.sh
2022-08-01 15:40:21 +02:00
commands =
./getlasso3.sh
django-admin {posargs}
2022-02-07 18:30:08 +01:00
[testenv:code-style]
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
2020-05-15 16:01:06 +02:00
[testenv:pylint]
usedevelop = true
2021-12-15 08:29:07 +01:00
basepython = python3
2020-05-15 16:01:06 +02:00
deps =
https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
2023-03-16 12:20:10 +01:00
Django<3.3
2020-05-15 19:00:28 +02:00
pylint<1.8
pylint-django<0.8.1
2020-05-15 16:01:06 +02:00
commands =
/bin/bash -c "./pylint.sh src/*/"
[pytest]
junit_family=xunit2
filterwarnings =
2020-10-23 11:52:07 +02:00
once
2020-11-27 17:40:13 +01:00
ignore:::django\..*
ignore:::authentic2\..*
ignore:::rest_framework\..*
ignore:::gettext\..*