0c7b64bdcb
Change-Id: Ifca2b452d196ccdebbb1da4a7080ee5a3626002d Signed-off-by: Paul Belanger <pabelanger@redhat.com>
38 lines
882 B
INI
38 lines
882 B
INI
[tox]
|
|
minversion = 1.6
|
|
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
|
|
passenv = HOME
|
|
setenv =
|
|
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
|
PYTHONUNBUFFERED = 1
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:linters]
|
|
setenv =
|
|
ANSIBLE_CONFIG = tests/ansible.cfg
|
|
whitelist_externals = bash
|
|
commands =
|
|
# PEP8 Lint Check
|
|
flake8
|
|
# Ansible List 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}
|