1536cf5101
This brings our tox.ini files inline with other OpenStack projects. Change-Id: Ib29b6a93e6c9e95c1c68508002ee9a15770fcc24 Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd Signed-off-by: Paul Belanger <pabelanger@redhat.com>
45 lines
1.0 KiB
INI
45 lines
1.0 KiB
INI
[tox]
|
|
minversion = 1.4.2
|
|
envlist = ansible-lint,docs,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:ansible-lint]
|
|
setenv =
|
|
ANSIBLE_CONFIG = tests/ansible.cfg
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
|
ansible-lint"
|
|
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
|
|
ansible-playbook --syntax-check -i tests/inventory \
|
|
-e rolename=$(basename $(pwd)) > /dev/null"
|
|
|
|
[testenv:functional]
|
|
commands =
|
|
ansible-playbook -i tests/inventory tests/test.yaml
|
|
passenv = HOME
|
|
setenv =
|
|
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
|
PYTHONUNBUFFERED = 1
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
|
ignore = E123,E125
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|