9105363441
Clean up our README.rst file and use variables right from defaults/main.yaml. This will ensure they are always up to date. Change-Id: If2f8bf5b04491f54590f840cbaa98f2d67faf8d0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
55 lines
1.3 KiB
INI
55 lines
1.3 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 =
|
|
# NOTE(pabelanger): Because ansible default ansible_user to null now, we need to pass it via CLI.
|
|
ansible-playbook -i tests/inventory tests/test.yaml -e ansible_user={env:USER}
|
|
passenv =
|
|
HOME
|
|
USER
|
|
setenv =
|
|
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
|
PYTHONUNBUFFERED = 1
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
commands=
|
|
bash -c "rm -rf doc/build"
|
|
doc8 doc
|
|
sphinx-build -b html doc/source doc/build/html
|
|
|
|
[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_ROLES_PATH = ..
|
|
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"
|