-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
109 lines (97 loc) · 2.28 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[tox]
envlist =
isort
flake8
pylint
bandit
# Python/Django combinations that are officially supported
py3{6,7,8,9,10}-django{32}
py3{8,9,10}-django{40}
py3{8,9,10,11}-django{41}
package
requirements
clean
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
DJANGO =
3.2: django32
4.0: django40
4.1: django41
[testenv]
description = Unit tests
deps =
.[saml]
coverage[toml]
pytest-django
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
commands =
coverage run -m pytest {posargs}
coverage xml
coverage report
[testenv:bandit]
description = PyCQA security linter
skip_install = true
deps = bandit[toml]
commands = bandit {posargs:-c pyproject.toml -r .}
[testenv:black]
description = Ensure consistent code style
skip_install = true
deps = black
commands = black {posargs:--check --diff cloudprojects setup.py tests}
[testenv:clean]
description = Remove bytecode and other debris
skip_install = true
deps = pyclean
commands = pyclean {posargs:. --debris --erase tests/*-report.xml tests/testproject/project.sqlite3 --yes}
[testenv:flake8]
description = Static code analysis and code style
skip_install = true
deps = flake8-django
commands = flake8 {posargs}
[testenv:isort]
description = Ensure imports are ordered consistently
skip_install = true
deps = isort[colors]
commands = isort --check-only --diff {posargs:cloudprojects setup.py tests}
[testenv:package]
description = Build package and check metadata (or upload package)
skip_install = true
deps =
build
twine
commands =
python -m build
twine {posargs:check --strict} dist/*
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
[testenv:pylint]
description = Check for errors and code smells
deps =
.[saml]
django
pylint-django
commands =
pylint {posargs:cloudprojects setup}
[testenv:requirements]
description = Update requirements.txt
skip_install = true
deps = pip-tools
commands =
pip-compile --resolver=backtracking --upgrade --quiet
git diff --color --exit-code requirements.txt
allowlist_externals =
git
[flake8]
exclude = .cache,.git,.tox,build,dist,cloudprojects.egg-info
max-line-length = 88