Files
zaqar-ui/tox.ini
Takashi Kajinami c034313088 Drop environments for nose
Horizon dropped its usage of nose in 14.0.0[1] and these environments
have been unused since then.

[1] 1f80d94459856a8c477310cc0fe4b0e165d8c0c1

Also remove a few leftovers from old versions.

Change-Id: I8a0113a94fe07bdc49f47feefcf9dfa846948259
2025-05-27 14:48:34 +09:00

95 lines
2.5 KiB
INI

[tox]
envlist = pep8,eslint,karma-local,docs-local,releasenotes
minversion = 3.18.0
[testenv]
usedevelop = True
setenv =
DJANGO_SETTINGS_MODULE=zaqar_ui.test.settings
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python manage.py test {posargs}
# 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]
commands = flake8 {posargs}
[flake8]
ignore = F405,W504
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
max-complexity = 20
[testenv:cover]
commands =
coverage erase
coverage run {toxinidir}/manage.py test zaqar_ui
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
# 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:py3-local]
commands =
{[testenv:hz-local]commands}
{[testenv]commands}
[testenv:eslint]
allowlist_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]
allowlist_externals =
{[testenv:eslint]whitelist_externals}
commands =
npm install
npm run test
[testenv:karma-local]
allowlist_externals =
{[testenv:eslint]whitelist_externals}
commands =
{[testenv:karma]commands}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
# zaqar-ui doc generated the module reference,
# so requirements.txt should be here to apply upper-constraints
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands=
sphinx-build -W -b html doc/source doc/build/html
[testenv:docs-local]
deps =
{[testenv:docs]deps}
commands=
{[testenv:hz-local]commands}
{[testenv:docs]commands}
[testenv:releasenotes]
deps =
{[testenv:docs]deps}
commands =
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html