vitrage-dashboard/tox.ini
manchandavishal 935e28fa0e Update tox.ini for tox4
OpenStack CI now uses tox4 by default. This patch drop
"skipsdist = True". When skipsdist=True is specified, a
target application is not installed into a tox env, but
there seems no reason to do so. In various other OpenStack
projects, a target applicatin needs to be installed into a
tox vnev, for example, in docs and/or linter jobs and it
causes failures with tox4. So dropping it would avoid potential
future failures.

Change-Id: Ic12cddd2fddee64ce115f209b1e10da3b66c689f
2023-01-18 15:56:31 +05:30

92 lines
2.2 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pep8,npm
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONUNBUFFERED = 1
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
{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]
allowlist_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:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:venv]
commands = {posargs}
[testenv:cover]
allowlist_externals = find
setenv =
PYTHON=coverage run --source vitrage-dashboard --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[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
allowlist_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