Fatih Degirmenci | 1d64dc4 | 2020-01-13 07:27:18 +0000 | [diff] [blame^] | 1 | [tox] |
| 2 | basepython = py36 |
| 3 | minversion = 2.5 |
| 4 | skipsdist = true |
| 5 | envlist = ansible-lint, shellcheck, yamllint |
| 6 | install_command = pip install {opts} {packages} |
| 7 | deps = -r{toxinidir}/test-requirements.txt |
| 8 | |
| 9 | [testenv:ansible-lint] |
| 10 | # TODO: set ignore_outcome to false once issues are fixed |
| 11 | ignore_outcome = true |
| 12 | whitelist_externals = bash |
| 13 | commands = |
| 14 | bash -c "find {toxinidir}/apps {toxinidir}/scenarios -type f -regex '.*.ya?ml' ! -regex '.*heat-template.*' -print0 | \ |
| 15 | xargs -t -n1 -0 ansible-lint --nocolor" |
| 16 | |
| 17 | [testenv:yamllint] |
| 18 | # TODO: set ignore_outcome to false once issues are fixed |
| 19 | ignore_outcome = true |
| 20 | whitelist_externals = bash |
| 21 | commands = |
| 22 | bash -c "find {toxinidir}/apps {toxinidir}/scenarios -type f -regex '.*.ya?ml' -print0 | \ |
| 23 | xargs -t -n1 -0 yamllint --format standard --strict" |
| 24 | |
| 25 | [testenv:shellcheck] |
| 26 | # TODO: set ignore_outcome to false once issues are fixed |
| 27 | ignore_outcome = true |
| 28 | whitelist_externals = bash |
| 29 | commands = |
| 30 | bash -c "find {toxinidir}/apps {toxinidir}/scenarios -type f -name '*.sh' -print0 | \ |
| 31 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir}/scenarios \ |
| 32 | --external-sources --format=tty" |