-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
87 lines (77 loc) · 1.58 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
[tox]
isolated_build = true
skipsdist = True
envlist =
pylint
black
isort
release
py{310,311}-django50
[testenv]
commands =
pytest --cov --cov-report=xml
deps =
pytest
pytest-cov
pytest-django
readtime
django-json-ld
django-extensions
wagtail
wagtail-metadata
wagtail-markdown
wagtail-foliage
django50: Django==5.0
setenv =
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}
[testenv:black]
# Empty list to not install all deps from base testenv
deps =
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install
commands = black --exclude '.*(migrations|.tox|.venv)' --check --diff .
[testenv:isort]
# Empty list to not install all deps from base testenv
deps =
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install
commands = isort --check-only --diff .
[testenv:pylint]
# Empty list to not install all deps from base testenv
deps =
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install
commands = pylint --django-settings-module=tests.settings wagtail_code_blog tests
[testenv:mypy]
deps =
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install
commands = mypy .
[testenv:release]
deps =
poetry
commands =
poetry publish --build
passenv =
POETRY_PYPI_TOKEN_PYPI
[pytest]
addopts = --ds=tests.settings --reuse-db -ra
testpaths = tests
norecursedirs = .git */migrations/* .venv
[coverage:run]
branch = True
source = wagtail_code_blog
omit =
./.venv/*
*/migrations/*
*/apps.py
[coverage:report]
fail_under = 45