-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
tox.ini
63 lines (55 loc) · 1.45 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
[tox]
envlist = sqlite,mypy,docs,ruff,vermin,
[testenv]
extras =
dev
postgres: postgres
mysql: mysql
deps =
django42: Django>=4.0,<4.2
django50: Django>=5.0,<5.1
commands = pytest -vv -m "not live" {posargs}
setenv =
PYTHONPATH={toxinidir}
sqlite: DATABASE_URL=sqlite:///:memory:
mysql: DATABASE_URL={env:DATABASE_URL:mysql://root:[email protected]:3306/mysql}
postgres: DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
passenv =
GENTESTCSR
# Hint: quickly run a one-shot container with:
# docker run --rm -e POSTGRES_PASSWORD=postgres -p 5432:5432 -it postgres
[testenv:live]
extras = dev, postgres
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]
extras = dev
commands = mypy .
[testenv:docs]
extras = docs
commands = make -C docs html
allowlist_externals = make
[testenv:ruff]
deps = ruff
commands =
ruff format .
ruff check --force-exclude --fix --exit-non-zero-on-fix
[testenv:vermin]
deps = vermin
commands =
vermin -t=3.9- --backport zoneinfo --violations .