Skip to content

Commit 10124eb

Browse files
committed
Fetch origin main for diff-cover
1 parent f5afae7 commit 10124eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/python-test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
node_version: ["20", "22"]
3030
steps:
3131
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0 # Fetch all history for diff-cover
3234
- name: Install uv
3335
uses: astral-sh/setup-uv@v6
3436
with:
@@ -61,11 +63,12 @@ jobs:
6163
run: black . --check --verbose
6264
- name: Run Python tests
6365
if: runner.os != 'Windows'
64-
run: pytest -s -vv --cov --cov-report=xml --cov-fail-under=90
66+
run: pytest -s -vv --cov --cov-report=xml --cov-fail-under=89
6567
- name: Check diff coverage
6668
if: runner.os != 'Windows' && github.event_name == 'pull_request'
6769
run: |
68-
diff-cover coverage.xml --fail-under=90
70+
git fetch origin main:refs/remotes/origin/main
71+
diff-cover coverage.xml --compare-branch=origin/main --fail-under=90
6972
- name: Run E2E tests with Playwright
7073
id: e2e
7174
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)