forked from Uninett/nav
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
119 lines (105 loc) · 3.25 KB
/
tox.ini
File metadata and controls
119 lines (105 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# -*- indent-tabs-mode: nil; -*-
# When changing the python or django version also change it in the tox example
# of the documentation in hacking.rst
[tox]
envlist =
{unit,integration}-py{39,310,311}-django{42}
{unit,integration}-py{310,311,313}-django{52}
javascript
docs
basepython = python3.9
[pytest]
addopts = --failed-first
markers =
twisted: marks tests as needing twisted async to run
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
[testenv]
# Baseline test environment
deps =
pip
-r tests/requirements.txt
-r requirements/base.txt
-r requirements/optional.txt
-r requirements/django{env:DJANGO_VER}.txt
-c constraints.txt
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
PYTHONPATH = {toxinidir}/tests
VIRTUALENV_PIP=23.1.0
BUILDDIR = {envdir}
DJANGO_SETTINGS_MODULE = nav.django.settings
COVERAGE_FILE = {toxinidir}/reports/coverage/.coverage
PYTHONFAULTHANDLER=1
DJANGO_VER=42
django42: DJANGO_VER=42
django50: DJANGO_VER=50
django51: DJANGO_VER=51
django52: DJANGO_VER=52
passenv =
C_INCLUDE_PATH
GITHUB_ACTIONS
GITHUB_RUN_ID
USER
PGHOST
PGPORT
PGDATABASE
PGUSER
PGPASSWORD
DISPLAY
DYLD_LIBRARY_PATH
LD_LIBRARY_PATH
allowlist_externals =
sh
mkdir
chmod
make
package = editable
commands_pre =
mkdir -p {toxinidir}/reports/coverage
chmod 777 {toxinidir}/reports/coverage
commands =
unit: pytest -o junit_suite_name="{envname} unit tests" --cov-config {toxinidir}/tests/.coveragerc --cov={toxinidir}/python --cov-report=xml:reports/{envname}/coverage.xml --junitxml=reports/{envname}/unit-results.xml --verbose {posargs:tests/unittests}
integration: make sassbuild
integration: pytest -o junit_suite_name="{envname} integration tests" --cov-config {toxinidir}/tests/.coveragerc --cov={toxinidir}/python --cov-report=xml:reports/{envname}/coverage.xml --html reports/{envname}/integration-report.html --junitxml=reports/{envname}/integration-results.xml --verbose --showlocals --browser chromium {posargs:tests/integration tests/functional}
[testenv:javascript]
setenv =
OPENSSL_CONF=/dev/null
usedevelop=True
allowlist_externals = {toxinidir}/tests/javascript-test.sh
commands_pre =
deps =
commands =
{toxinidir}/tests/javascript-test.sh "{toxinidir}"
[testenv:docs]
description = Just build the Sphinx documentation
deps =
-r doc/requirements.txt
usedevelop = true
setenv =
PYTHONPATH = {toxinidir}/python:{toxinidir}/tests
DJANGO_SETTINGS_MODULE = nav.django.settings
LC_ALL=C.UTF-8
LANG=C.UTF-8
VIRTUALENV_PIP=23.1.0
allowlist_externals = sh
commands_pre =
commands =
sphinx-build doc/ doc/_build/
sh -c "cd doc; python -c 'import conf; print(conf.version)' > {toxinidir}/reports/doc_version"
[testenv:django-warnings]
description = Fail if Django produces warnings at or above the configured level
deps =
-r requirements/base.txt
-r requirements/django42.txt
-c constraints.txt
setenv =
DJANGO_SETTINGS_MODULE = nav.django.settings
commands =
python -Wd -m nav.django.manage check --fail-level=ERROR