Skip to content

Commit d854722

Browse files
author
Antoine
committed
Add cobertura report generation to workflows and update test coverage reporting
1 parent 151ac53 commit d854722

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/OnPush.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,13 @@ jobs:
4646
with:
4747
report_paths: tests_reports/**/report.xml
4848
include_passed: true
49-
check_name: Pytest Test Report (${{ matrix.python-version }})
49+
check_name: Pytest Test Report (${{ matrix.python-version }})
50+
51+
- name: cobertura-report
52+
if: success() || failure()
53+
uses: 5monkeys/cobertura-action@v14
54+
with:
55+
path: tests_reports/**/coverage.xml
56+
minimum_coverage: 90
57+
fail_below_threshold: true
58+
report_name: Coverage Report (${{ matrix.python-version }})

.github/workflows/OnRelease.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ jobs:
4747
include_passed: true
4848
check_name: Pytest Test Report (${{ matrix.python-version }})
4949

50+
- name: cobertura-report
51+
if: success() || failure()
52+
uses: 5monkeys/cobertura-action@v14
53+
with:
54+
path: tests_reports/**/coverage.xml
55+
minimum_coverage: 90
56+
fail_below_threshold: true
57+
report_name: Coverage Report (${{ matrix.python-version }})
58+
5059
build:
5160
runs-on: ubuntu-latest
5261
needs: test

cache/tests_report.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dist/%-$(VERSION).tar.gz: %
1919
tests/%: % #with pytest
2020
-@coverage run --data-file $<.coverage --branch -m pytest --tb=short --disable-warnings --junitxml=tests_reports/$*/report.xml $<
2121
@coverage html -d tests_reports/$*/coverage --data-file $<.coverage
22+
@coverage xml -o tests_reports/$*/coverage.xml --data-file $<.coverage
2223
@coverage report -m --data-file $<.coverage
2324
@rm $<.coverage
2425

0 commit comments

Comments
 (0)