Setup tox

- add tox configuration for coverage reporting
This commit is contained in:
Jan Dittberner 2023-07-08 17:26:09 +02:00
parent e90b16b3dd
commit d54fd6ebcc
3 changed files with 93 additions and 3 deletions

25
tox.ini
View file

@ -1,13 +1,34 @@
[tox]
env_list =
py310
clean,py39,py310,py311,report
minversion = 4.6.4
[coverage:paths]
source =
gvacommon
[coverage:report]
omit =
gvacommon/tests/*
[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
pytest-cov
commands =
pytest {tty:--color=yes} {posargs}
pytest --cov --cov-append --cov-report=term-missing {tty:--color=yes} {posargs}
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report -m
coverage html
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase