forked from stephenmcd/mezzanine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
72 lines (66 loc) · 1.55 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
[tox]
envlist =
py{37,38,39,310}-dj{22,30,31,32,40}
package
lint
[testenv]
# Run test suite
usedevelop = true
deps =
.[testing]
dj22: Django>=2.2, <3
dj30: Django>=3.0, <3.1
dj31: Django>=3.1, <3.2
dj32: Django>=3.2, <3.3
dj40: Django>=4.0, <4.1
commands =
pytest --basetemp="{envtmpdir}" --junitxml="junit/TEST-{envname}.xml" {posargs}
[testenv:package]
# Check package integrity and compatibility with PyPI
deps =
twine
check-manifest
skip_install = true
commands =
python setup.py -q sdist --dist-dir="{envtmpdir}/dist"
twine check "{envtmpdir}/dist/*"
check-manifest --ignore-bad-ideas '*.mo' {toxinidir}
[testenv:lint]
skip_install = true
deps = .[codestyle]
commands =
isort --diff --atomic .
black --check .
flake8 .
[testenv:pyupgrade]
# Run pyupgrade with non-zero exit code (notice `+` at the end of command)
skip_install = true
allowlist_externals = sh
deps = .[codestyle]
commands =
sh -c 'find . -path ./.tox -prune -false -o -name "*.py" -exec pyupgrade --py37-plus \{\} +'
[testenv:format]
# This env is not run by default. It's provided here for you to easily
# autoformat code by running `tox -e format`
skip_install = true
allowlist_externals = sh
deps = .[codestyle]
commands =
sh -c 'find . -path ./.tox -prune -false -o -name "*.py" -exec pyupgrade --py37-plus \{\} \;'
isort --atomic .
black .
[flake8]
# Configured to match black
ignore =
E203
W503
E731
max-line-length = 88
exclude =
migrations
.tox
.git
.eggs
*.egg-info
build
dist