tripleo-ipsec/tox.ini

78 lines
1.9 KiB
INI

[tox]
minversion = 2.0
skipsdist = True
envlist = linters
[testenv]
usedevelop = True
install_command =
pip install -c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
deps =
-r{toxinidir}/test-requirements.txt
commands =
/usr/bin/find . -type f -name "*.pyc" -delete
passenv =
HOME
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
ANSIBLE_FORCE_COLOR
no_proxy
NO_PROXY
whitelist_externals =
bash
rm
sudo
setenv =
VIRTUAL_ENV={envdir}
[testenv:linters]
setenv =
{[testenv:ansible]setenv}
commands =
{[testenv:ansible-lint]commands}
{[testenv:ansible-syntax]commands}
[testenv:ansible]
#deps =
# {[testenv]deps}
setenv =
{[testenv]setenv}
ANSIBLE_HOST_KEY_CHECKING = False
ANSIBLE_SSH_CONTROL_PATH = /tmp/%%h-%%r
ANSIBLE_ACTION_PLUGINS = {homedir}/.ansible/roles/plugins/action
ANSIBLE_CALLBACK_PLUGINS = {homedir}/.ansible/roles/plugins/callback
ANSIBLE_FILTER_PLUGINS = {homedir}/.ansible/roles/plugins/filter
ANSIBLE_LOOKUP_PLUGINS = {homedir}/.ansible/roles/plugins/lookup
ANSIBLE_LIBRARY = {homedir}/.ansible/roles/plugins/library
ANSIBLE_ROLES_PATH = {homedir}/.ansible/roles:{toxinidir}/playbooks/roles
commands =
rm -rf {homedir}/.ansible/roles
[testenv:ansible-lint]
#deps =
# {[testenv:ansible]deps}
setenv =
{[testenv:ansible]setenv}
commands =
ansible-lint -x ANSIBLE0016,106 {toxinidir}
[testenv:ansible-syntax]
#deps =
# {[testenv:ansible]deps}
setenv =
{[testenv:ansible]setenv}
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
--syntax-check \
--list-tasks \
-e "rolename={toxinidir}" \
{toxinidir}/tests/test.yml
[testenv:venv]
basepython = python3
commands = {posargs}