blob: 335108916dc58e4d1d08e23e8bc69283eac93552 [file] [log] [blame]
# SPDX-FileCopyrightText: StorPool <support@storpool.com>
# SPDX-License-Identifier: BSD-2-Clause
[tox]
minversion = 4.1
envlist =
ruff
ruff-all
black
pep8
mypy
pylint
unit-tests
functional-cinder
isolated_build = true
[defs]
pyfiles =
python/gifn_apply \
python/unit_tests
[testenv:black]
skip_install = True
tags =
check
deps =
black >= 23, < 24
commands =
black --check -- {[defs]pyfiles}
[testenv:black-reformat]
skip_install = True
tags =
format
manual
deps =
black >= 23, < 24
commands =
black -- {[defs]pyfiles}
[testenv:pep8]
skip_install = True
tags =
check
deps =
flake8 >= 6, < 7
commands =
flake8 -- {[defs]pyfiles}
[testenv:mypy]
skip_install = True
tags =
check
deps =
-r python/requirements/test.txt
mypy >= 1, < 2
commands =
mypy -- {[defs]pyfiles}
[testenv:pylint]
skip_install = True
tags =
check
deps =
-r python/requirements/test.txt
pylint >= 2.16, < 2.17
commands =
pylint -- {[defs]pyfiles}
[testenv:ruff]
skip_install = True
tags =
check
deps =
ruff == 0.0.253
commands =
ruff check --config python/config/ruff-all/pyproject.toml -- {[defs]pyfiles}
[testenv:unit-tests]
tags =
tests
deps =
-r python/requirements/test.txt
commands =
pytest {posargs} python/unit_tests
[testenv:functional-cinder]
tags =
tests
setenv =
REPO_URL_OPENSTACK = {env:REPO_URL_OPENSTACK:https://github.com/openstack}
commands =
gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed
gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed -s series.experimental