make pipeline fail if code coverage < 75%

This commit is contained in:
HgO 2024-04-17 16:41:46 +02:00
parent cc77c27956
commit 60572d03fa
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ tests:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
junit: report.xml junit: report.xml
coverage: '/^TOTAL\s+\d+\s+\d+\s+([\d\.]+\%)$/' coverage: '/Total coverage: ([\d\.]+\%)$/'
needs: needs:
- job: linting - job: linting
artifacts: false artifacts: false

View file

@ -1,3 +1,3 @@
[pytest] [pytest]
asyncio_mode=strict asyncio_mode=strict
addopts=--cov=matrix_alertbot --cov-report=lcov:lcov.info --cov-report=xml:coverage.xml --cov-report=term addopts=--cov=matrix_alertbot --cov-report=lcov:lcov.info --cov-report=xml:coverage.xml --cov-report=term --cov-fail-under=75