blob: 98912c6bca7587c538084da3ef4e743dc3d22207 [file] [log] [blame]
[tox]
basepython = py36
minversion = 2.5
skipsdist = true
envlist = ansible-lint, shellcheck, yamllint
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
[testenv:ansible-lint]
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/kubespray -type f -regex '.*.ya?ml' ! -regex '.*heat-template.*' -print0 | \
xargs -t -n1 -0 ansible-lint --nocolor"
[testenv:yamllint]
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/kubespray -type f -regex '.*.ya?ml' -print0 | \
xargs -t -n1 -0 yamllint --format standard --strict"
[testenv:shellcheck]
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/kubespray -type f -name '*.sh' -print0 | \
xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir}/kubespray \
--external-sources --format=tty"