5026bc31b2
Python 3.8 is now our highest level supported python runtime. This updates the default tox target environments to swap out py37 for py38 to make sure local development testing is covering this version. This does not impact zuul jobs in any way, nor prevent local tests against py37. It just changes the default if none is explicitly provided. Change-Id: I36f764b858831bfa38df693bc6fcb85e858e5432 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
131 lines
3.2 KiB
INI
131 lines
3.2 KiB
INI
[tox]
|
|
envlist = pep8,py38,py36-local,eslint,karma-local,docs-local,releasenotes,lower-constraints-local
|
|
minversion = 2.3.2
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
python manage.py test {posargs} --settings=zun_ui.test.settings
|
|
|
|
# For installation of horizon on local
|
|
# NOTICE: this tox.ini requires horizon repository cloned in sibling directory.
|
|
[testenv:hz-local]
|
|
commands =
|
|
pip install -e ../horizon
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands = flake8 {posargs}
|
|
|
|
[flake8]
|
|
# F405 TEMPLATES may be undefined, or defined from star imports
|
|
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
|
|
ignore = F405
|
|
exclude = .venv,.git,.tox,dist,*egg,build,node_modules
|
|
max-complexity = 20
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
|
|
|
# NOTE(shu-mutow): On CI infra, horizon will be installed
|
|
# according to job setting. but on local, we need to install
|
|
# horizon from master branch.
|
|
[testenv:py36-local]
|
|
basepython = python3.6
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
{[testenv]commands}
|
|
|
|
[testenv:eslint]
|
|
basepython = python3
|
|
whitelist_externals =
|
|
npm
|
|
commands =
|
|
npm install
|
|
npm run lint
|
|
|
|
# NOTE(shu-mutow): The "postinstall" script on package.json will install horizon
|
|
# from master branch into python3.x environment for testing javascripts.
|
|
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
|
|
[testenv:karma]
|
|
basepython = python3
|
|
whitelist_externals =
|
|
{[testenv:eslint]whitelist_externals}
|
|
commands =
|
|
npm install
|
|
npm run test
|
|
|
|
[testenv:karma-local]
|
|
basepython = python3
|
|
whitelist_externals =
|
|
{[testenv:eslint]whitelist_externals}
|
|
commands =
|
|
{[testenv:karma]commands}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/docs
|
|
deps = {[testenv:docs]deps}
|
|
whitelist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:docs-local]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:docs]deps}
|
|
commands=
|
|
{[testenv:hz-local]commands}
|
|
{[testenv:docs]commands}
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:docs]deps}
|
|
commands =
|
|
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
[testenv:lower-constraints-local]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:lower-constraints]deps}
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
{[testenv]commands}
|
|
|