forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
117 lines (93 loc) · 2.36 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[tox]
env_list =
py{36,37,38,39,310,311,312}
lint
type
labels =
test = py{36,37,38,39,310,311,312}
lint = ruff, autopep8, pylint
type = mypy,mypy-strict
[testenv]
description = "run osbuild unit tests"
deps =
pytest
pytest-xdist
jsonschema
mako
iniparse
pyyaml
toml
pykickstart
# required by pykickstart but not pulled in automatically :/
requests
setenv =
LINTABLES = osbuild/ assemblers/* devices/*.* devices/test/*.py inputs/*.* mounts/*.* mounts/test/*.py runners/* sources/*.* stages/*.* inputs/test/*.py stages/test/*.py sources/test/*.py test/ tools/
LINTABLES_EXCLUDES = "*.json,*.sh"
LINTABLES_EXCLUDES_RE = ".*\.json$,.*\.sh"
TYPEABLES = osbuild
TYPEABLES_STRICT = ./osbuild/main_cli.py ./osbuild/util/parsing.py ./osbuild/testutil/atomic.py
passenv =
TEST_CATEGORY
commands =
python -m pytest -v --pyargs --rootdir=. {posargs}
allowlist_externals =
bash
[testenv:ruff]
deps =
ruff==0.3.0
commands =
bash -c 'python -m ruff check {env:LINTABLES}'
[testenv:autopep8]
deps =
autopep8==2.0.4
pycodestyle==2.11.0
commands =
bash -c 'python -m autopep8 --diff --max-line-length 120 -a -a -a -j0 -r --exclude {env:LINTABLES_EXCLUDES} --exit-code {env:LINTABLES}'
[testenv:pylint]
deps =
pylint==3.0.2
commands =
bash -c 'python -m pylint --ignore-patterns {env:LINTABLES_EXCLUDES_RE} {env:LINTABLES}'
[testenv:mypy]
deps =
mypy==1.2.0
commands =
bash -c 'python -m mypy {env:TYPEABLES}'
[testenv:mypy-strict]
deps =
mypy==1.2.0
commands =
bash -c 'python -m mypy --follow-imports=skip --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs {env:TYPEABLES_STRICT}'
[testenv:tomllib]
description = "test osbuild.util.toml with tomllib"
deps =
pytest
mako
tomli-w
commands =
python -m pytest -s -vvv -k test_util_toml
[testenv:tomli]
description = "test osbuild.util.toml with tomli"
deps =
pytest
tomli
tomli-w
mako
commands =
python -m pytest -s -vvv -k test_util_toml
[testenv:toml]
description = "test osbuild.util.toml with toml"
deps =
pytest
toml
mako
commands =
python -m pytest -s -vvv -k test_util_toml
[testenv:pytoml]
description = "test osbuild.util.toml with pytoml"
deps =
pytest
pytoml
mako
commands =
python -m pytest -s -vvv -k test_util_toml