-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
72 lines (65 loc) · 1.76 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]
minversion = 3.15
skipsdist = True
envlist = lint,docs
[testenv]
passenv = http_proxy,HTTP_PROXY,https_proxy,HTTPS_PROXY,no_proxy,NO_PROXY
commands =
find . -type f -name "*.pyc" -delete
[testenv:lint]
deps =
{env:BASHATE_INSTALL_PATH:bashate}
rstcheck[sphinx]
ansible
ansible-lint
yamllint
black
isort
flake8
vulture
allowlist_externals = bash
commands = bash -c "find {toxinidir} \
-not -path {toxinidir}/.tox/\* \
-not -path {toxinidir}/roles/\* \
# E006 check for lines longer than 79 columns
-name \*.sh | xargs bashate -v -iE006"
bash -c "yamllint -c .yaml-lint.yml {toxinidir}"
bash -c "find {toxinidir} \
-not -path {toxinidir}/.tox/\* \
-not -path {toxinidir}/playbooks/roles/\* \
-name \*.rst | xargs rstcheck"
bash -c "ansible-lint -v"
bash -c "black --check {toxinidir}"
bash -c "isort --check {toxinidir}"
bash -c "find {toxinidir} \
-not -path {toxinidir}/.tox/\* \
-name \*.py | xargs flake8"
bash -c "vulture --exclude {toxworkdir},{toxinidir}/docs/src/conf.py {toxinidir}"
[testenv:spell]
deps =
pyspelling
commands = pyspelling -c .spellcheck.yml
[testenv:docs]
deps =
sphinx
consolemd
allowlist_externals = bash
commands = sphinx-build -W -b html docs/src docs/build/html
bash -c "find {toxinidir} \
-not -path {toxinidir}/.tox/\* \
-name \*.md -exec consolemd \{\} \;"
[testenv:{nfd,pmem,qat_driver,sriov_cni,sriov_plugin,criproxy}]
deps = -r{toxinidir}/test-requirements.txt
setenv =
POSTFIX_NAME = {env:PYTHONHASHSEED}
passenv = VAGRANT_*
envdir = {toxinidir}/.tox/molecule
changedir = {toxinidir}/playbooks/roles/{envname}
commands = molecule --debug test {posargs}
[testenv:diagram]
deps =
diagrams
PyYAML
commands = python diagram.py
[flake8]
ignore = E501