forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
73 lines (57 loc) · 1.29 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
[tox]
env_list =
py{36,37,38,39,310,311}
lint
type
labels =
test = py{36,37,38,39,310,311}
lint = ruff, isort, autopep8, pylint
type = mypy
[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/* inputs/* mounts/* runners/* sources/* stages/*.* stages/test/*.py tools/
TYPEABLES = osbuild
passenv =
TEST_CATEGORY
commands =
bash -c 'python -m pytest --pyargs --rootdir=. {env:TEST_CATEGORY} {env:TEST_WORKERS}'
allowlist_externals =
bash
[testenv:ruff]
deps =
ruff==0.0.263
commands =
bash -c 'python -m ruff {env:LINTABLES}'
[testenv:isort]
deps =
isort==5.12.0
commands =
bash -c 'python -m isort --check --diff {env:LINTABLES}'
[testenv:autopep8]
deps =
autopep8==2.0.2
pycodestyle==2.10.0
commands =
bash -c 'python -m autopep8 --diff --max-line-length 120 -a -a -a -j0 -r --exit-code {env:LINTABLES}'
[testenv:pylint]
deps =
pylint==3.0.2
commands =
bash -c 'python -m pylint {env:LINTABLES}'
[testenv:mypy]
deps =
mypy==1.2.0
commands =
bash -c 'python -m mypy {env:TYPEABLES}'