X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tox.ini;h=30feecf8906f5617e1117fcf1aabab757e72e303;hb=d8eb12f4200c21f569df5bc01d378a846b4c0db0;hp=e9a14077b40b535ee3df0062b99cf8aa0bcc1d93;hpb=bdbd22904733af311225a3315555bb39ea12ed55;p=doctor.git diff --git a/tox.ini b/tox.ini index e9a14077..30feecf8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] minversion = 2.3.1 -envlist = py35 +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/pike \ +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 @@ -21,12 +21,46 @@ passenv = OS_PROJECT_DOMAIN_NAME OS_PROJECT_DOMAIN_ID OS_REGION_NAME + OS_CACERT IMAGE_NAME VM_COUNT PROFILER_TYPE CI_DEBUG INSTALLER_TYPE INSTALLER_IP - PROFILER_TYPE + INSPECTOR_TYPE + ADMIN_TOOL_TYPE + TEST_CASE + SSH_KEY 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