| # SPDX-FileCopyrightText: StorPool <support@storpool.com> |
| # SPDX-License-Identifier: BSD-2-Clause |
| |
| [tox] |
| minversion = 4.1 |
| envlist = |
| ruff |
| ruff-all |
| format |
| mypy |
| unit-tests |
| functional-cinder |
| isolated_build = true |
| |
| [defs] |
| pyfiles = |
| python/gifn_apply \ |
| python/unit_tests |
| |
| [testenv:format] |
| skip_install = True |
| tags = |
| check |
| deps = |
| -r python/requirements/ruff.txt |
| commands = |
| ruff format --check --config python/config/ruff-base/pyproject.toml --diff -- {[defs]pyfiles} |
| |
| [testenv:reformat] |
| skip_install = True |
| tags = |
| format |
| manual |
| deps = |
| -r python/requirements/ruff.txt |
| commands = |
| ruff format --config python/config/ruff-base/pyproject.toml -- {[defs]pyfiles} |
| |
| [testenv:mypy] |
| skip_install = True |
| tags = |
| check |
| deps = |
| -r python/requirements/test.txt |
| mypy >= 1, < 2 |
| commands = |
| mypy -- {[defs]pyfiles} |
| |
| [testenv:ruff] |
| skip_install = True |
| tags = |
| check |
| quick |
| deps = |
| -r python/requirements/ruff.txt |
| 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:reuse] |
| skip_install = True |
| tags = |
| check |
| quick |
| deps = |
| reuse >= 2, < 3 |
| commands = |
| reuse --root={toxinidir} lint |
| |
| [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 |