ansible-role-ssh/tox.ini
Paul Belanger 897f7ffd49 Import ansible-role-ssh into OpenStack
Change-Id: I909a781822754862d1db832fe225ee47ff244b3b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-02-23 21:48:59 +00:00

47 lines
1.1 KiB
INI

[tox]
minversion = 1.4.2
envlist = docs,linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:functional]
commands =
ansible-playbook -i tests/inventory tests/test.yaml -e ansible_user={env:USER}
passenv = HOME
setenv =
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
PYTHONUNBUFFERED = 1
[testenv:linters]
setenv =
ANSIBLE_CONFIG = tests/ansible.cfg
whitelist_externals = bash
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]
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