forked from wagtail/wagtail-localize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
105 lines (83 loc) · 2.63 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[tox]
min_version = 4.11
envlist =
python{3.9,3.10,3.11,3.12}-django4.2-wagtail{5.2,6.1,6.2}-postgres15
python{3.10,3.11,3.12}-django5.0-wagtail{5.2,6.1,6.2}-postgres15
python{3.12}-django5.1-wagtail{6.2}-postgres15
# note: we're running a subset of the test with sqlite
python3.10-django4.2-wagtail{5.2}-sqlite
python3.11-django5.0-wagtail{6.1}-sqlite
python3.12-django5.1-wagtail{6.2}-sqlite
[gh-actions]
python =
3.9: python3.9
3.10: python3.10
3.11: python3.11
3.12: python3.12
[gh-actions:env]
DATABASE =
postgres: postgres
sqlite: sqlite
[testenv]
package = editable
pass_env =
FORCE_COLOR
NO_COLOR
use_frozen_constraints = true
constrain_package_deps = true
setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_localize}
PYTHONDEVMODE = 1
# use the Python 3.12+ sys.monitoring
python3.12: COVERAGE_CORE=sysmon
extras = testing
deps =
django4.2: Django>=4.2,<5.0
django5.0: Django>=5.0,<5.1
django5.1: Django>=5.1,<5.2
wagtail5.2: wagtail>=5.2.2,<5.3
wagtail6.1: wagtail>=6.1,<6.2
wagtail6.2: wagtail>=6.2,<6.3
wagtailmain: git+https://github.com/wagtail/wagtail.git
postgres: psycopg2>=2.9
install_command = python -Im pip install --upgrade {opts} {packages}
commands =
python -Im coverage run testmanage.py test --deprecation all {posargs: -v 2}
[testenv:coverage-report]
base_python = python3.11
package = skip
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
base_python = python3.12
deps =
wagtailmain: git+https://github.com/wagtail/wagtail.git@main#egg=Wagtail
commands =
python -I testmanage.py test --deprecation all {posargs: -v 2}
[testenv:interactive]
description = An interactive environment for local testing purposes
basepython = python3.12
deps =
wagtail>=5.2,<6.3
Django>=4.2,<5.2
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
[testenv:migrations]
basepython = python3.11
# always generate with the min supported versions
deps =
Django>=4.2,<5.0
wagtail>=5.2,<6.0
commands =
python {toxinidir}/testmanage.py makemigrations