19aebca3e7
This adds a job which creates a bridge-like node and bootstraps it, and then runs the base playbook against all of the node types we use in our control plane. It uses testinfra to validate the results. Change-Id: Ibdbaf511bbdaee46e1335f2c83b95ba1553a1d94 Depends-On: https://review.openstack.org/595905
40 lines
1.1 KiB
INI
40 lines
1.1 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = linters
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
commands =
|
|
flake8
|
|
{toxinidir}/tools/run-bashate.sh
|
|
python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
|
python3 {toxinidir}/tools/irc_checks.py
|
|
python3 {toxinidir}/tools/check_clouds_yaml.py
|
|
# Ansible Lint Check
|
|
bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
|
ansible-lint -x ANSIBLE0004 -x ANSIBLE0006 -x ANSIBLE0007 -x ANSIBLE0011 \
|
|
-x ANSIBLE0012 -x ANSIBLE0013 -x ANSIBLE0015"
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
|
|
|
[testenv:testinfra]
|
|
commands = py.test -n 5 --connection=ansible --ansible-inventory=/etc/ansible/hosts/inventory.yaml --hosts=all -v {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
exclude = .tox,.eggs
|
|
ignore = E125,H
|
|
select = H231
|