nfv/tox.ini

38 lines
1.1 KiB
INI

[tox]
envlist = linters
minversion = 2.3
skipsdist = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
PYTHONDONTWRITEBYTECODE=True
install_command = pip install -U {opts} {packages}
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
deps = -r{toxinidir}/test-requirements.txt
[testenv:venv]
commands = {posargs}
[testenv:flake8]
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pep8]
description = Dummy environment to allow pep8 to be run in subdir tox
[testenv:pylint]
description = Dummy environment to allow pylint to be run in subdir tox
[testenv:linters]
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
-o \( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"