debian-forge/tox.ini
Michael Vogt ed95c10530 stages: add new unit test for kickstart stage
This commit adds a simple and lightweight unit test for the new
kickstart options. It's pretty simple but also cheap and runs
fast.
2023-11-07 15:12:08 +01:00

68 lines
1.1 KiB
INI

[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
jsonschema
mako
iniparse
pyyaml
setenv =
LINTABLES = osbuild/ assemblers/* devices/* inputs/* mounts/* runners/* sources/* stages/*.* stages/test/*.py
TYPEABLES = osbuild
passenv =
TEST_CATEGORY
commands =
bash -c 'python -m pytest --pyargs --rootdir=. {env:TEST_CATEGORY}'
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==2.17.3
commands =
bash -c 'python -m pylint {env:LINTABLES}'
[testenv:mypy]
deps =
mypy==1.2.0
commands =
bash -c 'python -m mypy {env:TYPEABLES}'