This commit is contained in:
Oscar Krause 2023-02-14 13:37:25 +01:00
parent 210a36c07f
commit 4972f00822

View File

@ -191,12 +191,13 @@ code_quality:
test_coverage: test_coverage:
extends: test extends: test
allow_failure: true
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: script:
- pip install pytest pytest-cov - pip install pytest pytest-cov
- coverage run -m pytest - coverage run -m pytest main.py
- coverage report - coverage report
- coverage xml - coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'