diff --git a/tox.ini b/tox.ini index 2ff1f7d8e..3e559af66 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands = passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] +basepython = python3 commands = doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst bash tools/flake8wrap.sh {posargs} @@ -33,11 +34,13 @@ commands = bandit -r zun -x tests -n5 -ll --skip B303,B604 [testenv:venv] +basepython = python3 #set PYTHONHASHSEED=0 to prevent oslo_policy.sphinxext from randomly failing. setenv = PYTHONHASHSEED=0 commands = {posargs} [testenv:cover] +basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source zun --parallel-mode @@ -49,12 +52,14 @@ commands = coverage report [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = doc8 -e .rst specs/ doc/source/ CONTRIBUTING.rst HACKING.rst README.rst sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [testenv:debug-py27] @@ -66,6 +71,7 @@ basepython = python3.5 commands = oslo_debug_helper {posargs} [testenv:migration] +basepython = python3 setenv = {[testenv]setenv} OS_TEST_PATH=./zun/tests/migration deps = {[testenv]deps} @@ -87,6 +93,7 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build local-check-factory = zun.hacking.checks.factory [testenv:fast8] +basepython = python3 # NOTE(sheel.rana): `tox -e fast8` cab be used to run pep8 command only for # updated code instead for running whole code base. # Use same environment directory as pep8 env to save space and install time. @@ -96,19 +103,23 @@ commands = {toxinidir}/tools/fast8.sh [testenv:releasenotes] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:genconfig] +basepython = python3 envdir = {toxworkdir}/venv commands = oslo-config-generator --config-file etc/zun/zun-config-generator.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file etc/zun/zun-policy-generator.conf [testenv:api-ref] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf api-ref/build