![Shu Muto](/assets/img/avatar_default.png)
For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more details information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I8f3f9f1ae087b0abd5db0b0f58e83870ca49a529
108 lines
2.9 KiB
INI
108 lines
2.9 KiB
INI
[tox]
|
|
envlist = pep8,py35,py35dj20,py27,eslint,karma,docs,releasenotes
|
|
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
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:pep8]
|
|
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}'
|
|
|
|
[testenv:py27]
|
|
commands =
|
|
# Clean-up env and install horizon from git
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
|
|
# Run test
|
|
python manage.py test {posargs}
|
|
# Clean-up env except log
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
|
|
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
commands =
|
|
# Clean-up env and install horizon from git
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
|
|
# Run test
|
|
python manage.py test {posargs}
|
|
# Clean-up env except log
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
|
|
|
|
[testenv:py35dj20]
|
|
basepython = python3.5
|
|
commands =
|
|
# Clean-up env and install horizon from git
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
|
|
# Run test
|
|
pip install django>=2.0,<2.1
|
|
python manage.py test {posargs}
|
|
# Clean-up env except log
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
|
|
|
|
[testenv:eslint]
|
|
whitelist_externals =
|
|
npm
|
|
commands =
|
|
# Clean-up env and install horizon from git
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
|
|
# Run test
|
|
npm install
|
|
npm run lint
|
|
# Clean-up env except log
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
|
|
|
|
[testenv:karma]
|
|
whitelist_externals =
|
|
npm
|
|
commands =
|
|
# Clean-up env and install horizon from git
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
|
|
# Run test
|
|
npm install
|
|
npm run test
|
|
# Clean-up env except log
|
|
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
|
|
|
|
[testenv:docs]
|
|
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:releasenotes]
|
|
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
|