-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathtox.ini
More file actions
78 lines (70 loc) · 2.05 KB
/
Copy pathtox.ini
File metadata and controls
78 lines (70 loc) · 2.05 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
[tox]
isolated_build = True
# See: https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
envlist =
mypy,docs,ruff,vermin
py{310,311,312,313,314}-django52-{postgres,mysql}
py{312,313,314}-django{60,61}-{postgres,mysql}
skip_missing_interpreters = True
[testenv]
extras = dev
deps =
django52: Django>=5.2,<5.3
django60: Django>=6.0,<6.1
django61: Django>=6.1,<6.2
postgres: psycopg[binary]
mysql: mysqlclient
commands = pytest -vv -m "not live" {posargs}
setenv =
PYTHONPATH={toxinidir}
sqlite: DATABASE_URL=sqlite:///:memory:
mysql: DATABASE_URL={env:DATABASE_URL:mysql://root:mysql@127.0.0.1:3306/mysql}
postgres: DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
passenv =
GENTESTCSR
PIP_NO_BINARY
# Hint: quickly run a one-shot container with:
# docker run --rm -e POSTGRES_PASSWORD=postgres -p 5432:5432 -it postgres:alpine
[testenv:live]
extras = dev
deps =
psycopg[binary]
commands = pytest -vv -m "live" {posargs}
setenv =
PYTHONPATH={toxinidir}
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
[testenv:makemigrations]
extras = dev
commands = django-admin makemigrations
setenv =
PYTHONPATH={toxinidir}
DATABASE_URL=sqlite:///:memory:
DJANGO_SETTINGS_MODULE=testapp.settings
[testenv:fixtures]
commands = python scripts/dump_metadata.py
setenv =
PYTHONPATH={toxinidir}
DATABASE_URL=sqlite:///:memory:
DJANGO_SETTINGS_MODULE=testapp.settings
[testenv:mypy]
# This breaks too often due to minor version upgrades of related packages.
# It's unreliable and we can't afford to let it block CI.
ignore_outcome = true
extras = dev
commands = mypy .
[testenv:docs]
extras = docs
commands = make -C docs html
allowlist_externals = make
[testenv:ruff]
# See: https://github.com/astral-sh/ruff/issues/14698
deps = ruff!=0.8.1
commands =
ruff format --exit-non-zero-on-format .
ruff check --force-exclude --fix --exit-non-zero-on-fix
skip_install = true
[testenv:vermin]
deps = vermin
commands =
vermin -t=3.10- --backport zoneinfo --violations .
skip_install = true