blob: 3fbf0f48fc33800c128178788eedc95ef3d328ce [file] [log] [blame]
Fatih Degirmencia63ee322020-01-13 07:40:37 +00001[tox]
2basepython = py36
3minversion = 2.5
4skipsdist = true
5envlist = ansible-lint, shellcheck, yamllint
Fatih Degirmenci31680142020-03-17 21:50:21 +00006install_command = pip install --force-reinstall {opts} {packages}
Fatih Degirmencia63ee322020-01-13 07:40:37 +00007deps = -r{toxinidir}/test-requirements.txt
8
9[testenv:ansible-lint]
Fatih Degirmenci31680142020-03-17 21:50:21 +000010description = invoke ansible-lint to analyse Ansible playbooks and roles
11deps = -r{toxinidir}/test-requirements.txt
Fatih Degirmencia63ee322020-01-13 07:40:37 +000012whitelist_externals = bash
13commands =
Fatih Degirmenci31680142020-03-17 21:50:21 +000014 bash -c "find {toxinidir}/test -type f -regex '.*.ya?ml' -print0 | \
Fatih Degirmencia63ee322020-01-13 07:40:37 +000015 xargs -t -n1 -0 ansible-lint --nocolor"
16
17[testenv:yamllint]
Fatih Degirmenci31680142020-03-17 21:50:21 +000018description = invoke yamllint to analyse YAML files
19deps = -r{toxinidir}/test-requirements.txt
Fatih Degirmencia63ee322020-01-13 07:40:37 +000020whitelist_externals = bash
21commands =
22 bash -c "find {toxinidir}/test -type f -regex '.*.ya?ml' -print0 | \
23 xargs -t -n1 -0 yamllint --format standard --strict"
24
25[testenv:shellcheck]
Fatih Degirmenci31680142020-03-17 21:50:21 +000026description = invoke shellcheck to analyse bash shell scripts
27deps = -r{toxinidir}/test-requirements.txt
Fatih Degirmencia63ee322020-01-13 07:40:37 +000028whitelist_externals = bash
29commands =
30 bash -c "find {toxinidir}/test -type f -name '*.sh' -print0 | \
31 xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir}/test \
32 --external-sources --format=tty"