blob: a9df5d0d91c579bc4e42b41deacabaebc325badf [file] [log] [blame]
Fatih Degirmenci0e744a92020-05-01 06:29:37 +00001[tox]
2basepython = py36
3minversion = 2.5
4skipsdist = true
5envlist = ansible-lint, shellcheck, yamllint, docs
6install_command = pip install --force-reinstall {opts} {packages}
7deps = -r{toxinidir}/test-requirements.txt
8
9[testenv:ansible-lint]
10description = invoke ansible-lint to analyse Ansible playbooks and roles
11deps = -r{toxinidir}/test-requirements.txt
12whitelist_externals = bash
13commands =
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]
19description = invoke yamllint to analyse YAML files
20deps = -r{toxinidir}/test-requirements.txt
21whitelist_externals = bash
22commands =
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]
28description = invoke shellcheck to analyse bash shell scripts
29deps = -r{toxinidir}/test-requirements.txt
30whitelist_externals = bash
31commands =
32 bash -c "find {toxinidir} -type f -regex '.*.sh' \
33 ! -regex '.*.tox.*\|.*.venv.*' \
34 -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \
35 --external-sources --format=tty"