[tox] envlist = flake8, pylint, mypy, vulture, pytest, eslint, htmlhint, shellcheck skipsdist = true [testenv] basepython = python3.10 sitepackages = true changedir = {toxinidir} [testenv:flake8] allowlist_externals = bash commands = bash -c 'flake8 --config={toxinidir}/testenv/linters/flake8.ini {toxinidir}/kvmd {toxinidir}/testenv/tests {toxinidir}/*.py' deps = flake8 flake8-quotes types-PyYAML types-aiofiles [testenv:pylint] allowlist_externals = bash commands = bash -c 'pylint -j0 --rcfile={toxinidir}/testenv/linters/pylint.ini --output-format=colorized --reports=no {toxinidir}/kvmd {toxinidir}/testenv/tests {toxinidir}/*.py' deps = pylint pytest pytest-asyncio aiohttp-basicauth types-PyYAML types-aiofiles [testenv:mypy] allowlist_externals = bash commands = bash -c 'mypy --config-file={toxinidir}/testenv/linters/mypy.ini --cache-dir={toxinidir}/testenv/.mypy_cache {toxinidir}/kvmd {toxinidir}/testenv/tests {toxinidir}/*.py' deps = mypy types-PyYAML types-aiofiles [testenv:vulture] allowlist_externals = bash commands = bash -c 'vulture --ignore-names=_format_P,Plugin --ignore-decorators=@exposed_http,@exposed_ws,@pytest.fixture {toxinidir}/kvmd {toxinidir}/testenv/tests {toxinidir}/*.py {toxinidir}/testenv/linters/vulture-wl.py' deps = vulture types-PyYAML types-aiofiles [testenv:pytest] commands = py.test -vv --cov-config={toxinidir}/testenv/linters/coverage.ini --cov-report=term-missing --cov=kvmd {toxinidir}/testenv/tests setenv = PYTHONPATH={toxinidir} deps = pytest pytest-cov pytest-mock pytest-asyncio pytest-aiohttp aiohttp-basicauth types-PyYAML types-aiofiles [testenv:eslint] allowlist_externals = eslint commands = eslint --cache-location=/tmp --config={toxinidir}/testenv/linters/eslintrc.js --color {toxinidir}/web/share/js [testenv:htmlhint] allowlist_externals = htmlhint commands = htmlhint --config={toxinidir}/testenv/linters/htmlhint.json {toxinidir}/web/*.html {toxinidir}/web/*/*.html [testenv:shellcheck] allowlist_externals = bash commands = bash -c 'shellcheck --color=always {toxinidir}/kvmd.install {toxinidir}/scripts/*'