-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtox.ini
More file actions
71 lines (61 loc) · 1.88 KB
/
tox.ini
File metadata and controls
71 lines (61 loc) · 1.88 KB
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
[tox]
skipsdist=True
envlist=
lint,
python{3.12,3.13}-django5.2-wagtail{6.3,6.4,7.0}
coverage
[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
commands=
python -b -m coverage run --parallel-mode --source='wagtailsharing' {toxinidir}/testmanage.py test {posargs}
basepython=
python3.12: python3.12
python3.13: python3.13
deps=
django5.2: Django>=5.2,<5.3
wagtail6.3: wagtail>=6.3,<6.4
wagtail6.4: wagtail>=6.4,<6.5
wagtail7.0: wagtail>=7.0,<7.1
[testenv:lint]
basepython=python3.13
deps=
ruff
bandit
commands=
ruff format --check
ruff check wagtailsharing testmanage.py
bandit -c "pyproject.toml" -r wagtailsharing testmanage.py
[testenv:coverage]
basepython=python3.13
deps=
coverage[toml]
diff_cover
commands=
coverage combine
coverage report -m --fail-under=100
coverage erase
[isort]
combine_as_imports=1
lines_after_imports=2
include_trailing_comma=1
multi_line_output=3
skip=.tox,migrations
use_parentheses=1
known_django=django
known_wagtail=wagtail
default_section=THIRDPARTY
sections=FUTURE,STDLIB,DJANGO,WAGTAIL,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[testenv:interactive]
basepython=python3.13
deps=
Django>=5.2,<5.3
wagtail>=7.0,<7.1
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 shell -c "from wagtailsharing.models import SharingSite;(not SharingSite.objects.filter(site_id=1).exists()) and SharingSite.objects.create(site_id=1, hostname='sharing.localhost', port=8000)"
commands=
{posargs:python testmanage.py runserver 0.0.0.0:8000}
setenv=
INTERACTIVE=1