-
Notifications
You must be signed in to change notification settings - Fork 24
/
tox.ini
70 lines (53 loc) · 1.74 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
[tox]
skipsdist = True
usedevelop = True
envlist =
python{3.11,3.12}-django{4.2}-wagtail{5.2}-{sqlite,postgres}-{base,llm}
python{3.12}-django{main}-wagtail{main}-{sqlite,postgres}-{base,llm}
[testenv]
pass_env =
FORCE_COLOR
NO_COLOR
set_env =
DJANGO_DEBUG = false
STATIC_ROOT = {envtmpdir}/test-static
STATICFILES_STORAGE = django.contrib.staticfiles.storage.ManifestStaticFilesStorage
commands =
python {toxinidir}/testmanage.py makemigrations --check --dry-run
python {toxinidir}/testmanage.py collectstatic --no-input
coverage run -m pytest {posargs}
basepython =
python3.11: python3.11
python3.12: python3.12
deps =
django4.2: Django>=4.2,<4.3
djangomain: git+https://github.com/django/django.git@main#egg=Django
wagtail5.2: wagtail>=5.2,<6.0
wagtailmain: git+https://github.com/wagtail/wagtail.git
postgres: psycopg2>=2.6
.[testing]
[testenv:llm]
deps =
{[testenv]deps}
.[llm]
setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_ai}
[testenv:coverage-report]
commands =
python -Im coverage combine
python -Im coverage report -m
[testenv:interactive]
basepython = python3.11
deps =
wagtail>=5.2
.[testing]
commands_pre =
python {toxinidir}/testmanage.py makemigrations
python {toxinidir}/testmanage.py migrate
python {toxinidir}/testmanage.py shell -c "from django.contrib.auth.models import User;(not User.objects.filter(username='admin').exists()) and User.objects.create_superuser('admin', 'super@example.com', 'changeme')"
python {toxinidir}/testmanage.py createcachetable
commands =
{posargs:python testmanage.py runserver 0.0.0.0:8020}
setenv =
INTERACTIVE = 1
PYTHONPATH = {toxinidir}/tests:{toxinidir}