blob: 3fbf0f48fc33800c128178788eedc95ef3d328ce [file] [log] [blame]
[tox]
basepython = py36
minversion = 2.5
skipsdist = true
envlist = ansible-lint, shellcheck, yamllint
install_command = pip install --force-reinstall {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
[testenv:ansible-lint]
description = invoke ansible-lint to analyse Ansible playbooks and roles
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/test -type f -regex '.*.ya?ml' -print0 | \
xargs -t -n1 -0 ansible-lint --nocolor"
[testenv:yamllint]
description = invoke yamllint to analyse YAML files
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/test -type f -regex '.*.ya?ml' -print0 | \
xargs -t -n1 -0 yamllint --format standard --strict"
[testenv:shellcheck]
description = invoke shellcheck to analyse bash shell scripts
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/test -type f -name '*.sh' -print0 | \
xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir}/test \
--external-sources --format=tty"