test coverage with tox
Some checks failed
ci/woodpecker/push/tests Pipeline failed

This commit is contained in:
Ivan Schaller 2022-06-25 02:50:39 +02:00
parent e779acbff8
commit 88d40cf87b
3 changed files with 15 additions and 11 deletions

View file

@ -1,4 +1,4 @@
python 3.9.13
python 3.9.13 3.10.5 3.8.13 3.7.13 3.6.15
shfmt 3.5.1
shellcheck 0.8.0
just 1.2.0

View file

@ -38,15 +38,13 @@ pipeline:
commands:
- mypy --install-types --non-interactive mangadlp/
# test code and generate coverage report
test-coverage-pytest:
image: cr.44net.ch/ci-plugins/tests
# test code with different python versions and generate coverage report
test-tox-pytest-coverage:
image: cr.44net.ch/ci-plugins/multipy:1-linux-amd64
pull: true
commands:
- pip install -r requirements_dev.txt
- coverage erase
- coverage run
- coverage xml -i
- tox
- tox -e coverage
# analyse code with sonarqube and upload it
sonarqube-analysis:

12
tox.ini
View file

@ -4,10 +4,16 @@ isolated_build = True
[testenv]
deps =
pytest
coverage
-rrequirements.txt
-rrequirements_dev.txt
commands =
pytest -x --basetemp="{envtmpdir}" {posargs}
[testenv:coverage]
deps =
-rrequirements_dev.txt
commands =
coverage erase
coverage run
coverage xml -i