forked from red-hat-storage/ocs-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
68 lines (60 loc) · 1.38 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[tox]
envlist = black,py39,py310,py311,flake8,docs,collectonly,logging
[gh-actions]
python =
3.9: py39, flake8, collectonly
3.10: py39, flake8, collectonly
3.11: py311, black, docs, flake8, collectonly, logging
[testenv]
deps =
-rrequirements.txt
pytest-cov
commands = py.test \
--ignore=tests \
-c pytest_unittests.ini \
--cov=ocs_ci \
{posargs}
[testenv:collectonly]
commands = py.test --collect-only tests
[testenv:flake8]
deps =
flake8
flake8-mutable
skip_install = true
skipsdist = true
commands = flake8 ocs_ci tests
[flake8]
basepython = python3
ignore = E203, E402, E741, W503
enable-extensions = M511
exclude =
venv,
.venv,
.git,
.github,
.tox,
__pycache__,
.pytest_cache
max-line-length = 120
# We will change this to 79 in new PR with all the fixes of:
# https://travis-ci.org/red-hat-storage/ocs-ci/jobs/523393041
[testenv:docs]
allowlist_externals = *
deps =
-rrequirements-docs.txt
changedir = docs
skipsdist = true
commands = /usr/bin/make -f Makefile.tox html
[testenv:black]
deps =
black==24.3.0
skip_install = true
skipsdist = true
commands = black . --check
[testenv:logging]
allowlist_externals = *
deps =
skip_install = true
skipsdist = true
commands =
bash -c 'git grep -E "logging\.(error|warning|info|exception)" && error="Direct use of logging module!"; false || echo "$error"; [[ -z "$error" ]]'