blob: c085ead48c61aa1f47b2728eb94356968744605b [file] [log] [blame]
Fatih Degirmenci8cabc622020-06-25 10:44:59 +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
13# TODO (fdegir): upstream bifrost file bootstrap.yml in install-configure-bifrost/file
14# excluded from ansible-lint since we can't fix issues in them and they will disappear
15# one they are fixed in upstream
16commands =
17 bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
18 ! -regex '.*.tox.*\|.*.venv.*' \
19 -print0 | xargs -t -n1 -0 ansible-lint --nocolor"
20
21[testenv:yamllint]
22description = invoke yamllint to analyse YAML files
23deps = -r{toxinidir}/test-requirements.txt
24whitelist_externals = bash
25commands =
26 bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
27 ! -regex '.*.tox.*\|.*.venv.*' \
28 -print0 | xargs -t -n1 -0 yamllint --format standard --strict"
29
30[testenv:shellcheck]
31description = invoke shellcheck to analyse bash shell scripts
32deps = -r{toxinidir}/test-requirements.txt
33whitelist_externals = bash
34commands =
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"