c9fb559b57
OpenStack is dropping the py2.7 support in ussuri cycle. vitrage-dashboard is ready with python 3 and ok to drop the python 2.7 support. Complete discussion & schedule can be found in - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html - https://etherpad.openstack.org/p/drop-python2-support Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Change-Id: I21499eedca87193f78bcf633c21380d757c788f6
83 lines
2.1 KiB
INI
83 lines
2.1 KiB
INI
[tox]
|
|
minversion = 2.3.2
|
|
envlist = py37,py36,py3-{dj111,dj22},pep8,npm
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONUNBUFFERED = 1
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
dj111: pip install django>=1.11,<2
|
|
dj22: pip install django>=2.2,<2.3
|
|
{envpython} {toxinidir}/manage.py test vitrage_dashboard {posargs} --exclude-tag integration {posargs}
|
|
|
|
[testenv:integration]
|
|
# Run integration tests only
|
|
passenv = AVCONV_INSTALLED
|
|
setenv =
|
|
PYTHONHASHSEED=0
|
|
INTEGRATION_TESTS=1
|
|
SELENIUM_HEADLESS=1
|
|
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=vitrage_dashboard/dashboard/tests/integration/horizon.conf
|
|
basepython = python3
|
|
commands = {envpython} {toxinidir}/manage.py test vitrage_dashboard --tag integration {posargs}
|
|
|
|
|
|
[testenv:pep8]
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
commands =
|
|
flake8
|
|
bash {toxinidir}/tools/find_executables.sh
|
|
|
|
[testenv:npm]
|
|
passenv =
|
|
HOME
|
|
DISPLAY
|
|
commands =
|
|
nodeenv -p
|
|
npm install
|
|
npm run {posargs:test}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-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:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
envdir = {toxworkdir}/docs
|
|
whitelist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[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
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|