chore: add tox lint, format and test environments
This commit is contained in:
parent
d468870d64
commit
b00aefaf78
1 changed files with 47 additions and 0 deletions
47
tox.ini
Normal file
47
tox.ini
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
[tox]
|
||||||
|
requires =
|
||||||
|
tox>=4.19
|
||||||
|
env_list =
|
||||||
|
unit-py3{9-13}
|
||||||
|
smoke-py3{9-13}
|
||||||
|
lint
|
||||||
|
format
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
deps =
|
||||||
|
../posix-sdc
|
||||||
|
.
|
||||||
|
|
||||||
|
[testenv:lint]
|
||||||
|
description = run type check on code base
|
||||||
|
labels = static
|
||||||
|
deps =
|
||||||
|
mypy
|
||||||
|
commands =
|
||||||
|
mypy src tests --junit-xml test-reports/{env_name}.xml
|
||||||
|
|
||||||
|
[testenv:format]
|
||||||
|
description = check formatting
|
||||||
|
labels = static
|
||||||
|
deps =
|
||||||
|
autopep8
|
||||||
|
commands =
|
||||||
|
autopep8 --diff --exit-code src tests
|
||||||
|
|
||||||
|
[testenv:unit-py3{9-13}]
|
||||||
|
description = run unit tests
|
||||||
|
labels = unit
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
pytest
|
||||||
|
commands =
|
||||||
|
pytest tests/unit --junitxml=test-reports/{env_name}.xml
|
||||||
|
|
||||||
|
[testenv:smoke-py3{9-13}]
|
||||||
|
description = run smoke tests against the console entry points
|
||||||
|
labels = smoke
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
pytest
|
||||||
|
commands =
|
||||||
|
pytest tests/smoke --junitxml=test-reports/{env_name}.xml
|
||||||
Loading…
Add table
Add a link
Reference in a new issue