monasca-notification/tox.ini
Hasan Acar 13121a1059 Making the gates happy
fix: allowlist_externals added to tox

fix: upgrading gevent

fix: pep8 issue fixed for slack_notifier

fix: change env list

Change-Id: Iefc7fdc89a398623aa3515c89240b53a49c10282
2024-03-06 13:42:44 +00:00

95 lines
2.5 KiB
INI

[tox]
envlist = py3,pep8,cover
minversion = 2.7
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=tests
passenv =
*_proxy
*_PROXY
usedevelop = True
install_command = pip install {opts} {packages}
allowlist_externals = bash
find
rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
.[jira_plugin]
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
[testenv:cover]
description = Calculates code coverage
setenv =
PYTHON=coverage run --source monasca_notification --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
commands =
oslo_debug_helper -t ./monasca_notification/tests {posargs}
[testenv:pep8]
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:venv]
commands = {posargs}
[testenv:flake8]
commands =
flake8 monasca_notification
flake8 tests
[testenv:bandit]
commands =
bandit -r monasca_notification -n5 -x monasca_notification/tests
[testenv:genconfig]
description = Generates an example of monasca-notification configuration file
commands = oslo-config-generator \
--config-file={toxinidir}/config-generator/notification.conf
[flake8]
max-line-length = 100
# TODO: ignored checks should be enabled in the future
# H201 no 'except:' at least use 'except Exception:'
# H202: assertRaises Exception too broad
# H405 multi line docstring summary not separated with an empty line
# W504 line break occurred after a binary operator
ignore = F821,H201,H202,H405,W504
exclude=.venv,.git,.tox,dist,*egg,build
[hacking]
import_exceptions =
six.moves
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html \
releasenotes/source releasenotes/build/html
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
deps = bindep
commands = bindep test
usedevelop = False