generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 36
/
tox.ini
104 lines (91 loc) · 1.89 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
[tox]
minversion = 4.0
skipsdist = True
[common]
format_dirs = {toxinidir}/plugins {toxinidir}/tests
[testenv]
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
PYTHONWARNINGS=default::DeprecationWarning
passenv = PYTHONPATH
install_command = pip install {opts} {packages}
deps = -r {toxinidir}/test-requirements.txt
[testenv:add_docs]
deps =
git+https://github.com/ansible-network/collection_prep
commands =
collection_prep_add_docs -p .
[testenv:antsibull-docs]
deps =
aiohttp>=3.9.0b1 # required for python 3.12
antsibull-docs
commands =
antsibull-docs lint-collection-docs .
[testenv:black]
deps =
black==23.12.1
commands =
black --check --diff {[common]format_dirs}
[testenv:black_format]
deps =
{[testenv:black]deps}
commands =
black -v {[common]format_dirs}
[testenv:flake8]
deps =
flake8
commands =
flake8 {[common]format_dirs}
[testenv:isort]
deps =
isort
commands =
isort --check-only --diff {[common]format_dirs}
[testenv:isort_format]
deps =
{[testenv:isort]deps}
commands =
isort -v {[common]format_dirs}
[testenv:mypy]
allowlist_externals = bash
deps =
mypy
pytest
pytest-forked
pytest-mock
pytest-xdist
types-PyYAML
packaging
requests[security]
xmltodict
setenv =
{[testenv]setenv}
MYPYPATH={toxinidir}
commands = bash {toxinidir}/run_mypy.sh
[testenv:format]
deps =
{[testenv:black]deps}
{[testenv:isort]deps}
commands =
{[testenv:black]commands}
{[testenv:isort]commands}
[testenv:linters]
allowlist_externals =
{[testenv:mypy]allowlist_externals}
deps =
{[testenv:antsibull-docs]deps}
{[testenv:black]deps}
{[testenv:flake8]deps}
{[testenv:isort]deps}
{[testenv:mypy]deps}
commands =
{[testenv:antsibull-docs]commands}
{[testenv:black]commands}
{[testenv:flake8]commands}
{[testenv:isort]commands}
{[testenv:mypy]commands}
[flake8]
ignore = E402
max-line-length = 160
show-source = True