-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
tox.ini
56 lines (50 loc) · 1.3 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
[tox]
envlist =
py{39,310,311}-django{42,50}-postgres
py311-django{42,50}-mysql,
sqlite,
live
[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:mysql@127.0.0.1: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