ansible-role-cloud-launcher/tox.ini
Ricardo Carrillo Cruz 901ff94f59 Run cloud launcher with latest release candidate
Along with the requirements change, there are also needed changes
roles_path and ansible_python_interpreter variable handling, for
some reason latest Ansible did not like current configuration.

Change-Id: I5fc78d479e276711365ea497edd4d3e38cacd650
2016-09-17 19:32:44 +00:00

48 lines
1.2 KiB
INI

[tox]
minversion = 1.4.2
envlist = docs,linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:functional]
commands =
ansible-playbook -i tests/inventory tests/test.yaml \
-e "@tests/resources.yml" -e "ansible_python_interpreter={toxinidir}/.tox/functional/bin/python"
passenv = HOME
setenv =
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
PYTHONUNBUFFERED = 1
[testenv:docs]
commands = python setup.py build_sphinx
[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
[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' ! -path './.tox/*' -print0 | xargs -t -n1 -0 \
ansible-lint"
# Ansible Syntax Check
bash -c "find tests -type f -regex '.*.y[a]?ml' ! -name 'resources.yml' \
-print | xargs -t -n1 \
ansible-playbook --syntax-check -i tests/inventory \
-e rolename=$(basename $(pwd)) > /dev/null"