2012-06-11 11:07:14 +01:00
|
|
|
[tox]
|
2013-09-17 16:34:21 +00:00
|
|
|
minversion = 1.6
|
2015-12-22 10:15:21 +01:00
|
|
|
envlist = linters
|
2013-09-19 07:57:23 -07:00
|
|
|
skipsdist = True
|
2012-06-11 11:07:14 +01:00
|
|
|
|
2013-09-17 16:34:21 +00:00
|
|
|
[testenv]
|
2018-08-21 10:59:38 +10:00
|
|
|
basepython = python3
|
2013-09-19 07:57:23 -07:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2013-09-17 16:34:21 +00:00
|
|
|
|
2015-12-22 10:15:21 +01:00
|
|
|
[testenv:linters]
|
2017-01-12 15:32:46 -05:00
|
|
|
whitelist_externals = bash
|
2015-12-22 10:15:21 +01:00
|
|
|
commands =
|
2018-08-22 15:34:25 +10:00
|
|
|
bash -c "find roles/ playbooks/roles -maxdepth 1 -mindepth 1 -type d -print0 | \
|
2018-08-22 14:39:03 +10:00
|
|
|
xargs -t -n1 -0 {toxinidir}/tools/check_readme.sh"
|
2015-12-22 10:15:21 +01:00
|
|
|
flake8
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
2018-06-15 13:58:57 +10:00
|
|
|
python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
|
|
|
python3 {toxinidir}/tools/irc_checks.py
|
|
|
|
python3 {toxinidir}/tools/check_clouds_yaml.py
|
2017-01-12 15:32:46 -05:00
|
|
|
# Ansible Lint Check
|
2018-08-22 15:34:25 +10:00
|
|
|
bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
2018-06-17 10:14:59 -04:00
|
|
|
ansible-lint -x ANSIBLE0004 -x ANSIBLE0006 -x ANSIBLE0007 -x ANSIBLE0011 \
|
|
|
|
-x ANSIBLE0012 -x ANSIBLE0013 -x ANSIBLE0015"
|
2015-12-22 10:15:21 +01:00
|
|
|
|
2012-09-26 13:39:31 -07:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
2013-09-19 07:57:23 -07:00
|
|
|
|
2014-08-27 14:10:16 -04:00
|
|
|
[testenv:docs]
|
2018-08-20 14:14:30 +10:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
2014-08-27 14:10:16 -04:00
|
|
|
|
2018-08-22 09:46:07 -07:00
|
|
|
[testenv:testinfra]
|
2018-08-29 11:04:07 -07:00
|
|
|
commands = py.test --junit-xml junit.xml --connection=ansible --ansible-inventory=/etc/ansible/hosts/inventory.yaml -v testinfra {posargs}
|
2018-08-22 09:46:07 -07:00
|
|
|
|
2013-09-19 07:57:23 -07:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2015-12-07 10:47:37 +01:00
|
|
|
exclude = .tox,.eggs
|
2013-09-19 07:57:23 -07:00
|
|
|
ignore = E125,H
|
2014-05-29 23:48:56 +02:00
|
|
|
select = H231
|