-
Notifications
You must be signed in to change notification settings - Fork 342
/
tox.ini
72 lines (62 loc) · 2 KB
/
tox.ini
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
[tox]
envlist =
py312-dj{main,51,50,42}-postgres
py311-dj{main,51,50,42}-postgres
py310-dj{main,51,50,42}-postgres
py39-dj42-postgres
py38-dj42-postgres
linting
[testenv]
extras = testing
deps =
djmain: https://github.com/django/django/archive/main.tar.gz
dj51: Django>=5.1,<5.2
dj50: Django>=5.0,<5.1
dj42: Django>=4.2,<4.3
mysql_myisam: mysqlclient==2.1.0
mysql_innodb: mysqlclient==2.1.0
postgres: psycopg[binary]
coverage: coverage[toml]
coverage: coverage-enable-subprocess
pytestmin: pytest>=7.0,<7.1
xdist: pytest-xdist>=1.15
setenv =
mysql_innodb: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_innodb
mysql_myisam: DJANGO_SETTINGS_MODULE=pytest_django_test.settings_mysql_myisam
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]
extras =
deps =
ruff==0.6.3
mypy==1.11.2
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}
[testenv:doc8]
extras =
basepython = python3
skip_install = true
deps =
sphinx
doc8
commands =
doc8 docs/
[testenv:docs]
deps =
extras = docs
commands = sphinx-build -n -W -b html -d docs/_build/doctrees docs docs/_build/html