0a01169189
Horizon plugins needs horizon on master branch for our master development and test. Recent changes in CI infra and horizon force to change horizon installation, and added tox_helper.sh as trivial fix. Now, reasonable fix found for horizon plugins, so this patch fixes them. Also, use python3.5 for js jobs. Change-Id: Ibcaf177db21f96e60ee2b222ddd24bc61c3ee9e4
137 lines
3.3 KiB
INI
137 lines
3.3 KiB
INI
[tox]
|
|
envlist = pep8,py27-local,py35-local,py35dj20-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://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-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]
|
|
commands = {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3.5
|
|
commands = flake8 {posargs}
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,*egg,build,node_modules
|
|
max-complexity = 20
|
|
|
|
[testenv:cover]
|
|
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:py27]
|
|
basepython = python2.7
|
|
|
|
[testenv:py27-local]
|
|
basepython = python2.7
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
{[testenv]commands}
|
|
|
|
[testenv:py35-local]
|
|
basepython = python3.5
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
{[testenv]commands}
|
|
|
|
[testenv:py35dj20]
|
|
basepython = python3.5
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
{[testenv]commands}
|
|
|
|
[testenv:py35dj20-local]
|
|
basepython = python3.5
|
|
commands =
|
|
{[testenv:hz-local]commands}
|
|
pip install -U django>=2.0,<2.1
|
|
{[testenv]commands}
|
|
|
|
[testenv:eslint]
|
|
basepython = python3.5
|
|
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 py35 environment for testing javascripts.
|
|
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
|
|
[testenv:karma]
|
|
basepython = python3.5
|
|
whitelist_externals =
|
|
{[testenv:eslint]whitelist_externals}
|
|
commands =
|
|
npm install
|
|
npm run test
|
|
|
|
[testenv:karma-local]
|
|
basepython = python3.5
|
|
whitelist_externals =
|
|
{[testenv:eslint]whitelist_externals}
|
|
commands =
|
|
{[testenv:karma]commands}
|
|
|
|
[testenv:docs]
|
|
basepython = python3.5
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:docs-local]
|
|
basepython = python3.5
|
|
deps =
|
|
{[testenv:docs]deps}
|
|
commands=
|
|
{[testenv:hz-local]commands}
|
|
{[testenv:docs]commands}
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3.5
|
|
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}
|
|
|