Control docker version within stack
[infra/stack/kubernetes.git] / tox.ini
1 [tox]
2 basepython = py36
3 minversion = 2.5
4 skipsdist = true
5 envlist = ansible-lint, shellcheck, yamllint, docs
6 install_command = pip install --force-reinstall {opts} {packages}
7 deps = -r{toxinidir}/test-requirements.txt
8
9 [testenv:ansible-lint]
10 description = invoke ansible-lint to analyse Ansible playbooks and roles
11 deps = -r{toxinidir}/test-requirements.txt
12 whitelist_externals = bash
13 commands =
14   bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
15     ! -regex '.*heat-template.*\|.*.tox.*\|.*.venv.*' \
16     -print0 | xargs -t -n1 -0 ansible-lint --nocolor"
17
18 [testenv:yamllint]
19 description = invoke yamllint to analyse YAML files
20 deps = -r{toxinidir}/test-requirements.txt
21 whitelist_externals = bash
22 commands =
23   bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
24     ! -regex '.*.tox.*\|.*.venv.*' \
25     -print0 | xargs -t -n1 -0 yamllint --format standard --strict"
26
27 [testenv:shellcheck]
28 # TODO (fdegir): shellcheck errors are ignored since those come from scenarios
29 # and we need time to fix those
30 ignore_outcome = true
31 description = invoke shellcheck to analyse bash shell scripts
32 deps = -r{toxinidir}/test-requirements.txt
33 whitelist_externals = bash
34 commands =
35   bash -c "find {toxinidir} -type f -regex '.*.sh' \
36     ! -regex '.*.tox.*\|.*.venv.*' \
37     -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \
38     --external-sources --format=tty"