forked from wagtail/wagtail-localize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
83 lines (64 loc) · 2.22 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
[tox]
skipsdist = True
usedevelop = True
envlist =
python{3.7}-django{3.2}-wagtail{4.1,4.2}-{sqlite,postgres12}
python{3.8,3.9,3.10}-django{3.2}-wagtail{4.1,4.2}-{sqlite,postgres12}
python{3.8,3.9,3.10}-django{4.0,4.1}-wagtail{4.1,4.2}-{sqlite,postgres15}
python{3.11}-django{4.1}-wagtail{4.1,4.2}-{sqlite,postgres15}
[gh-actions]
python =
3.7: python3.7
3.8: python3.8
3.9: python3.9
3.10: python3.10
3.11: python3.11
[gh-actions:env]
DATABASE =
postgres: postgres
[flake8]
# E501: Line too long
# W503: line break before binary operator (superseded by W504 line break after binary operator)
ignore = E501,W503
exclude = migrations,node_modules
[testenv]
install_command = pip install -e ".[testing]" -U {opts} {packages}
commands = coverage run testmanage.py test --deprecation all {posargs: -v 2}
deps =
coverage
typing_extensions>=4.0
django3.2: Django>=3.2,<3.3
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
djangomain: git+https://github.com/django/django.git@main#egg=Django
wagtail4.1: wagtail>=4.1,<4.2
wagtail4.2: wagtail>=4.2,<5.0
wagtailmain: git+https://github.com/wagtail/wagtail.git
# Pinned to work around UTC connection error
# https://stackoverflow.com/questions/68024060/assertionerror-database-connection-isnt-set-to-utc
postgres: psycopg2
setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_localize}
[testenv:flake8]
basepython=python3.7
deps=flake8>=2.2.0
commands=flake8 wagtail_localize
[testenv:interactive]
basepython = python3.9
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', '[email protected]', 'changeme')"
python {toxinidir}/testmanage.py createcachetable
commands =
{posargs:python testmanage.py runserver 0.0.0.0:8020}
setenv =
INTERACTIVE = 1
[testenv:migrations]
basepython = python3.9
# always generate with the min supported versions
deps =
Django~=3.2
wagtail>=4.1
commands =
python {toxinidir}/testmanage.py makemigrations