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]
|
2019-01-24 16:13:14 +01:00
|
|
|
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 =
|
2023-02-22 09:57:22 +01:00
|
|
|
!local: https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
|
2023-02-13 12:22:33 +01:00
|
|
|
local: ../authentic
|
2020-05-15 16:01:06 +02:00
|
|
|
# dependency constraints for authentic
|
2020-07-03 13:41:16 +02:00
|
|
|
py3: file-magic
|
2022-05-16 11:51:31 +02:00
|
|
|
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
|
2023-10-19 10:55:57 +02:00
|
|
|
psycopg2-binary
|
2020-05-15 16:01:06 +02:00
|
|
|
oldldap: python-ldap<3
|
|
|
|
ldaptools
|
2022-03-28 16:22:38 +02:00
|
|
|
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
|
2019-01-25 15:18:34 +01:00
|
|
|
pytest-freezegun
|
2020-05-15 16:01:06 +02:00
|
|
|
pytest-random
|
|
|
|
django-webtest
|
|
|
|
pyquery
|
2023-10-19 10:55:35 +02:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
|
|
|
./check-migrations.sh
|
2018-09-27 15:53:28 +02:00
|
|
|
commands =
|
2020-04-01 11:33:35 +02:00
|
|
|
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 =
|
2023-02-22 09:57:22 +01:00
|
|
|
!local: https://git.entrouvert.org/entrouvert/authentic/archive/main.tar.gz
|
2023-02-13 12:22:33 +01:00
|
|
|
local: ../authentic
|
2022-02-07 18:30:08 +01:00
|
|
|
psycopg2-binary
|
2023-10-19 10:55:35 +02:00
|
|
|
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
|
2023-10-19 10:55:35 +02:00
|
|
|
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]
|
2020-05-16 12:31:52 +02:00
|
|
|
usedevelop = true
|
2021-12-15 08:29:07 +01:00
|
|
|
basepython = python3
|
2020-05-15 16:01:06 +02:00
|
|
|
deps =
|
2023-02-22 09:57:22 +01:00
|
|
|
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\..*
|