blob: fac9bfbbbfabadd8770506d595c62281d1b22540 [file] [log] [blame]
Peter Pentchevb91fc932023-01-19 15:27:13 +02001# SPDX-FileCopyrightText: StorPool <support@storpool.com>
2# SPDX-License-Identifier: BSD-2-Clause
3
4[tox]
5envlist =
6 ruff
7 ruff-all
8 black
9 pep8
10 mypy
11 pylint
12 unit-tests
13 functional-cinder
14isolated_build = true
15
16[defs]
17pyfiles =
18 python/gifn_apply
19 python/unit_tests
20
21[testenv:black]
22skip_install = True
23tags =
24 check
25deps =
26 black >= 23, < 24
27commands =
28 black --check -- {[defs]pyfiles}
29
30[testenv:black-reformat]
31skip_install = True
32tags =
33 format
34 manual
35deps =
36 black >= 23, < 24
37commands =
38 black -- {[defs]pyfiles}
39
40[testenv:pep8]
41skip_install = True
42tags =
43 check
44deps =
45 flake8 >= 6, < 7
46commands =
47 flake8 -- {[defs]pyfiles}
48
49[testenv:mypy]
50skip_install = True
51tags =
52 check
53deps =
54 -r python/requirements/test.txt
55 mypy >= 1, < 2
56commands =
57 mypy -- {[defs]pyfiles}
58
59[testenv:pylint]
60skip_install = True
61tags =
62 check
63deps =
64 -r python/requirements/test.txt
65 pylint >= 2.16, < 2.17
66commands =
67 pylint -- {[defs]pyfiles}
68
69[testenv:ruff]
70skip_install = True
71tags =
72 check
73deps =
74 ruff >= 0.0.253, < 0.1
75commands =
76 ruff check --config python/config/ruff-most/pyproject.toml -- {[defs]pyfiles}
77
78[testenv:ruff-all]
79skip_install = True
80tags =
81 check
82deps =
83 ruff == 0.0.253
84commands =
85 ruff check --config python/config/ruff-all/pyproject.toml -- {[defs]pyfiles}
86
87[testenv:unit-tests]
88tags =
89 tests
90deps =
91 -r python/requirements/test.txt
92commands =
93 pytest {posargs} python/unit_tests
94
95[testenv:functional-cinder]
96tags =
97 tests
98setenv =
99 REPO_URL_OPENSTACK = {env:REPO_URL_OPENSTACK:https://github.com/openstack}
100commands =
101 gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed
102 gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed -s series.experimental