Skip to content

Commit 2d586a9

Browse files
committed
Add test coverage to workflow
1 parent a318a13 commit 2d586a9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/python-test.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ jobs:
6161
run: black . --check --verbose
6262
- name: Run Python tests
6363
if: runner.os != 'Windows'
64-
run: pytest -s -vv --cov --cov-fail-under=89
64+
run: pytest -s -vv --cov --cov-report=xml --cov-fail-under=90
65+
- name: Check diff coverage
66+
if: runner.os != 'Windows'
67+
run: |
68+
git fetch origin main:refs/remotes/origin/main
69+
diff-cover coverage.xml --compare-branch=origin/main --fail-under=90
6570
- name: Run E2E tests with Playwright
6671
id: e2e
6772
if: runner.os != 'Windows'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ coverage.xml
5454
.hypothesis/
5555
.pytest_cache/
5656
cover/
57+
coverage_report.html
5758

5859
# Translations
5960
*.mo

0 commit comments

Comments
 (0)