blob: ad40b7334fc948b31cc5c89d5429d209b0d40928 [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 =
Peter Pentchevb91fc932023-01-19 15:27:13 +020074 ruff == 0.0.253
75commands =
76 ruff check --config python/config/ruff-all/pyproject.toml -- {[defs]pyfiles}
77
78[testenv:unit-tests]
79tags =
80 tests
81deps =
82 -r python/requirements/test.txt
83commands =
84 pytest {posargs} python/unit_tests
85
86[testenv:functional-cinder]
87tags =
88 tests
89setenv =
90 REPO_URL_OPENSTACK = {env:REPO_URL_OPENSTACK:https://github.com/openstack}
91commands =
92 gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed
93 gifn_apply -v -p {toxinidir}/../../patches -P {toxinidir}/sh/git-if-needed -s series.experimental