-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathtox.ini
More file actions
65 lines (58 loc) · 2.03 KB
/
tox.ini
File metadata and controls
65 lines (58 loc) · 2.03 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
[tox]
envlist =
py314-dj{main,60,52,51}-postgres
py313-dj{main,60,52,51}-postgres
py312-dj{main,60,52,51,42}-postgres
py311-dj{52,51,42}-postgres
py310-dj{52,51,42}-postgres
linting
[testenv]
dependency_groups =
testing
coverage: coverage
mysql: mysql
postgres: postgres
xdist: xdist
deps =
djmain: https://github.com/django/django/archive/main.tar.gz
dj60: Django>=6.0a1,<6.1
dj52: Django>=5.2a1,<6.0
dj51: Django>=5.1,<5.2
dj42: Django>=4.2,<4.3
pytestmin: pytest>=7.0,<7.1
setenv =
mysql: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql
postgres: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_postgres
sqlite: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite
sqlite_file: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite_file
coverage: PYTESTDJANGO_TEST_RUNNER=coverage run -m pytest
coverage: COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
coverage: COVERAGE_FILE={toxinidir}/.coverage
coverage: PYTESTDJANGO_COVERAGE_SRC={toxinidir}/
passenv = PYTEST_ADDOPTS,TERM,TEST_DB_USER,TEST_DB_PASSWORD,TEST_DB_HOST
usedevelop = True
commands =
coverage: coverage erase
{env:PYTESTDJANGO_TEST_RUNNER:pytest} {posargs:tests}
coverage: coverage combine
coverage: coverage report
coverage: coverage xml
[testenv:linting]
dependency_groups = linting
commands =
ruff check {posargs:pytest_django pytest_django_test tests}
ruff format --quiet --diff {posargs:pytest_django pytest_django_test tests}
mypy {posargs:pytest_django pytest_django_test tests}
ec .
python -c "import subprocess, sys; sys.exit(subprocess.call('zizmor --persona=pedantic --format sarif .github/workflows/deploy.yml .github/workflows/main.yml > zizmor.sarif', shell=True))"
[testenv:doc8]
basepython = python3
skip_install = true
dependency_groups = docs
deps =
doc8
commands =
doc8 docs/
[testenv:docs]
dependency_groups = docs
commands = sphinx-build -n -W -b html -d docs/_build/doctrees docs docs/_build/html