zun-ui/tox.ini
Shu Muto 8d9571ab6f Clean-up tox
To simplify tox.ini, move processes for cleaning-up env and
installing horizon from git into tools/tox_helper.sh.

Change-Id: I6b3d66869ef3958c311dae57333c3e557207aa13
2018-04-13 17:47:06 +09:00

113 lines
3.1 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]
commands =
# Clean-up env and install horizon from git
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
# Run test
python setup.py build_sphinx
# Clean-up env except log
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
[testenv:releasenotes]
commands =
# Clean-up env and install horizon from git
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
# Run test
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
# Clean-up env except log
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt