X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tox.ini;h=2937c3290649ff3b6fcaab8c64e71a5cdc578a15;hb=refs%2Fheads%2Fmaster;hp=c6262ed5e61f139d1ec1d469c06a8c4701dcb3c0;hpb=9ee9b136ebec5d21f5165acc5e4441c3e91a56dd;p=doctor.git diff --git a/tox.ini b/tox.ini index c6262ed5..2937c329 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] minversion = 2.3.1 -envlist = py34 +envlist = py36,pep8,docs,docs-linkcheck skipsdist = True [testenv] usedevelop = True -install_command = pip install \ - -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata \ +install_command = pip3 install \ + -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/stein \ {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt @@ -15,13 +15,53 @@ passenv = OS_USERNAME OS_PASSWORD OS_USER_DOMAIN_NAME + OS_USER_DOMAIN_ID OS_PROJECT_NAME OS_TENANT_NAME OS_PROJECT_DOMAIN_NAME + OS_PROJECT_DOMAIN_ID + OS_REGION_NAME + OS_CACERT IMAGE_NAME VM_COUNT PROFILER_TYPE - PYTHON_ENABLE CI_DEBUG -changedir = {toxinidir}/tests + INSTALLER_TYPE + INSTALLER_IP + INSPECTOR_TYPE + ADMIN_TOOL_TYPE + TEST_CASE + SSH_KEY + APP_MANAGER_TYPE +changedir = {toxinidir}/doctor_tests commands = doctor-test + /usr/bin/find {toxinidir} -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete + +[testenv:pep8] +changedir = {toxinidir} +commands = flake8 + +[flake8] +# E123, E125 skipped as they are invalid PEP-8. +# H106: Don’t put vim configuration in source files +# H203: Use assertIs(Not)None to check for None + +show-source = True +ignore = E123,E125 +enable-extensions=H106,H203 +builtins = _ +filename = *.py,app.wsgi +exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tests + +[testenv:docs] +changedir = {toxinidir} +deps = -rdocs/requirements.txt +commands = + sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html + echo "Generated docs available in {toxinidir}/docs/_build/html" +whitelist_externals = echo + +[testenv:docs-linkcheck] +changedir = {toxinidir} +deps = -rdocs/requirements.txt +commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck