-
Notifications
You must be signed in to change notification settings - Fork 20
/
tox.ini
63 lines (54 loc) · 1.65 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
[tox]
skipsdist=True
envlist=
lint,
python3.8-django{4.2}-wagtail{6.2}
python3.12-django{4.2,5.0}-wagtail{6.2,6.3}
python3.12-django5.1-wagtail6.3
coverage
[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
commands=
python -b -m coverage run --parallel-mode --source='wagtailinventory' {toxinidir}/testmanage.py test {posargs}
basepython=
python3.8: python3.8
python3.12: python3.12
deps=
django4.2: Django>=4.2,<4.3
django5.0: Django>=5.0,<5.1
django5.1: Django>=5.1,<5.2
wagtail6.2: wagtail>=6.2,<6.3
wagtail6.3: wagtail>=6.3,<6.4
[testenv:lint]
basepython=python3.12
deps=
ruff
bandit
commands=
ruff format --check
ruff check wagtailinventory testmanage.py
bandit -c "pyproject.toml" -r wagtailinventory testmanage.py
[testenv:coverage]
basepython=python3.12
deps=
coverage[toml]
diff_cover
commands=
coverage combine
coverage report -m
coverage xml
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
[testenv:interactive]
basepython=python3.12
deps=
Django>=5.0,<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', '[email protected]', 'changeme')"
python {toxinidir}/testmanage.py loaddata wagtailinventory/fixtures/test_blocks.json
python {toxinidir}/testmanage.py block_inventory
commands=
{posargs:python testmanage.py runserver 0.0.0.0:8000}
setenv=
INTERACTIVE=1