-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
91 lines (69 loc) · 2.02 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[tox]
min_version = 4.11
skipsdist = True
envlist =
py{311,312}-django{4.2}-wagtail{5.2}-{sqlite,postgres}-{llm,base}
py{312}-django{main}-wagtail{main}-{sqlite,postgres}-{llm,base}
[gh-actions]
python =
3.11: py311
3.12: py312
[gh-actions:env]
DB =
sqlite: sqlite
postgres: postgres
WAGTAIL =
5.2: wagtail5.2
main: wagtailmain
DJANGO =
4.2: django4.2
main: djangomain
[testenv]
pass_env =
FORCE_COLOR
NO_COLOR
set_env =
PYTHONPATH = {toxinidir}
PYTHONDEVMODE = 1
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_vector_index}
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.9
-e .[pgvector]
llm:
-e .[llm]
-e .[testing]
commands = python -Im coverage run -m pytest {posargs}
[testenv:coverage-report]
base_python = python3.11
; a bit of a hack - we want to keep deps to a minimum here
deps =
coverage>=7.0,<8.0
commands =
python -Im coverage combine
python -Im coverage report -m
[testenv:wagtailmain]
description = Test with latest Wagtail main branch
deps =
wagtailmain: git+https://github.com/wagtail/wagtail.git@main#egg=Wagtail
[testenv:interactive]
description = An interactive environment for local testing purposes
package = editable
basepython = python3.11
deps =
wagtail>=5.2
-e .[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}