New tox entry points for OpenStack
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
c9c5332a38
commit
dc31df08b9
44
tox.ini
44
tox.ini
@ -1,24 +1,16 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.4.2
|
minversion = 1.4.2
|
||||||
envlist = ansible-lint,docs,pep8
|
envlist = docs,linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:ansible-lint]
|
[testenv:docs]
|
||||||
setenv =
|
commands = python setup.py build_sphinx
|
||||||
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:ansible-functional]
|
[testenv:functional]
|
||||||
commands =
|
commands =
|
||||||
ansible-playbook -i tests/inventory tests/test.yaml
|
ansible-playbook -i tests/inventory tests/test.yaml
|
||||||
passenv = HOME
|
passenv = HOME
|
||||||
@ -26,11 +18,29 @@ setenv =
|
|||||||
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
||||||
PYTHONUNBUFFERED = 1
|
PYTHONUNBUFFERED = 1
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:linters]
|
||||||
commands = python setup.py build_sphinx
|
setenv =
|
||||||
|
ANSIBLE_CONFIG = tests/ansible.cfg
|
||||||
[testenv:pep8]
|
whitelist_externals = bash
|
||||||
commands = flake8
|
commands =
|
||||||
|
# PEP8 Lint Check
|
||||||
|
flake8
|
||||||
|
# Ansible Lint Check
|
||||||
|
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
||||||
|
ansible-lint"
|
||||||
|
# Ansible Syntax Check
|
||||||
|
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:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user