This repository has been archived by the owner on Oct 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
108 lines (95 loc) · 2.43 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
[tox]
minversion = 2.0
skipsdist = True
envlist = py36,bashate,flake8,ansible-lint,
commit-message-validate,verify-copyright,
file-format
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
envdir = {toxinidir}/.tox/py36
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
whitelist_externals =
/usr/bin/bash
/bin/bash
/usr/bin/find
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr
[testenv:bashate]
basepython = python3.6
commands =
bash -c "find {toxinidir} \
-path {toxinidir}/.tox -prune -o \
-path {toxinidir}/pup-venv -prune -o \
-name '*.sh' -print | xargs bashate --error E006 -v"
whitelist_externals = bash
[testenv:pycodestyle]
basepython = python3.6
commands =
pycodestyle scripts/python/ tests/
[testenv:flake8]
basepython = python3.6
commands =
flake8
[flake8]
exclude =
.venv,.git,.tox,*lib/python*,*egg,build,pup-venv
# W504 line break after binary operator
ignore =
E402,E501,F403,F405,E722,F812,W504
[testenv:pylint]
basepython = python3.6
deps =
pyflakes
pylint
commands =
pylint scripts/python/ tests/
[testenv:pylint-errors]
basepython = python3.6
deps =
pyflakes
pylint
commands =
pylint --errors-only scripts/python/ tests/
[testenv:ansible-lint]
basepython = python3.6
commands =
# Perform an Ansible lint check
bash -c \"find {toxinidir} \
-name '*_procedure*.yml' -prune -o \
-name '*.tox*' -prune -o \
-name '*.yml' -print -o \
-name '*.yaml' -print -o \
-path {toxinidir}/pup-venv -prune | \
xargs ansible-lint -x \
ANSIBLE0006,ANSIBLE0012,ANSIBLE0013,\
ANSIBLE0014,ANSIBLE0016,204\"
[testenv:commit-message-validate]
basepython = python3.6
commands =
bash -c "{toxinidir}/tests/commit_message_validate.py"
[testenv:verify-copyright]
basepython = python3.6
commands =
bash -c "{toxinidir}/tests/verify_copyright.py"
[testenv:linters]
basepython = python3.6
commands =
{[testenv:flake8]commands}
{[testenv:bashate]commands}
{[testenv:ansible-lint]commands}
[testenv:file-format]
basepython = python3.6
commands =
bash -c "! find {toxinidir} \
\( -path '{toxinidir}/pup-venv' -o \
-path '{toxinidir}/\.tox' -o \
-path '{toxinidir}/\.git' -o \
-path '{toxinidir}/\.eggs' \) \
-prune -o -print | \
xargs file | \
egrep 'with (CR|CRLF) line terminators'"