X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=tox.ini;fp=tox.ini;h=a9df5d0d91c579bc4e42b41deacabaebc325badf;hp=0000000000000000000000000000000000000000;hb=0ee637017774692ae73514e146f25c8973c3bffe;hpb=3db382c1263ee71f838ab17b4a1595c1300d34f7 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..a9df5d0 --- /dev/null +++ b/tox.ini @@ -0,0 +1,35 @@ +[tox] +basepython = py36 +minversion = 2.5 +skipsdist = true +envlist = ansible-lint, shellcheck, yamllint, docs +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} -type f -regex '.*.ya?ml' \ + ! -regex '.*heat-template.*\|.*.tox.*\|.*.venv.*' \ + -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} -type f -regex '.*.ya?ml' \ + ! -regex '.*.tox.*\|.*.venv.*' \ + -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} -type f -regex '.*.sh' \ + ! -regex '.*.tox.*\|.*.venv.*' \ + -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \ + --external-sources --format=tty"