diff --git a/requirements.txt b/requirements.txt index 1a62d2e..48c2f4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,5 @@ # process, which may cause wedges in the gate later. pbr>=1.8 # Apache-2.0 +ansible>=2.0.0.0 # GNU LGPL 3.0 +shade==1.13.2 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 05e47bc..14d62dc 100755 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,42 @@ [tox] minversion = 2.0 -envlist=pep8 +envlist = lampstack, docs, releasenotes +skip_install = True skipsdist = True [testenv] usedevelop = True +sitepackages = False install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} +whitelist_externals = * setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/test-requirements.txt -commands = python setup.py test --slowest --testr-args='{posargs}' - -[testenv:pep8] -commands = flake8 {posargs} +passenv = HOME OS_USERNAME OS_PASSWORD OS_PROJECT_NAME http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt [testenv:venv] commands = {posargs} -[testenv:cover] -commands = python setup.py test --coverage --testr-args='{posargs}' +[testenv:ansible] +deps = + {[testenv]deps} +setenv = + {[testenv]setenv} + ANSIBLE_HOST_KEY_CHECKING = False + ANSIBLE_SSH_CONTROL_PATH = /tmp/%%h-%%r + +[testenv:lampstack] +deps = + {[testenv:ansible]deps} +setenv = + {[testenv:ansible]setenv} + LAMPSTACK_DIR = {toxinidir}/workloads/ansible/shade/lampstack + ANSIBLE_INVENTORY = {env:LAMPSTACK_DIR}/hosts + ANSIBLE_CONFIG = {env:LAMPSTACK_DIR}/ansible.cfg +commands = ansible-playbook -e "action=apply {posargs}" {env:LAMPSTACK_DIR}/site.yml [testenv:docs] commands = python setup.py build_sphinx @@ -27,14 +44,3 @@ commands = python setup.py build_sphinx [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html - -[testenv:debug] -commands = oslo_debug_helper {posargs} - -[flake8] -# E123, E125 skipped as they are invalid PEP-8. - -show-source = True -ignore = E123,E125 -builtins = _ -exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build