-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
59 lines (55 loc) · 1.44 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
[tox]
skipsdist=True
envlist=
lint,
py{38,311}-dj{3,4}-wag{3, 4,latest},
coverage
[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
commands=
python -b -m coverage run --parallel-mode --source='portablepages' {envbindir}/django-admin test {posargs}
setenv=
DJANGO_SETTINGS_MODULE=portablepages.tests.settings
basepython=
py38: python3.8
py311: python3.11
deps=
dj3: Django>=3.2,<4
dj4: Django>=4.1,<5
wag3: wagtail>=3,<4
wag4: wagtail>=4,<5
waglatest: wagtail>4
[testenv:lint]
basepython=python3.8
deps=
mypy
black
ruff
isort
commands=
mypy portablepages
black --check portablepages
ruff --diff portablepages
[testenv:coverage]
basepython=python3.8
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.8
deps=
Django>=3.2,<3.3
setenv=
DJANGO_SETTINGS_MODULE=portablepages.tests.settings
INTERACTIVE=1
commands_pre=
{envbindir}/django-admin makemigrations
{envbindir}/django-admin migrate
{envbindir}/django-admin 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')"
commands=
{posargs:{envbindir}/django-admin runserver 0.0.0.0:8000}