File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 29
29
node_version : ["20.14", "22"]
30
30
steps :
31
31
- uses : actions/checkout@v5
32
+ with :
33
+ # Fetch full history so diff-cover can compute a merge base with origin/main
34
+ fetch-depth : 0
32
35
- name : Install uv
33
36
uses : astral-sh/setup-uv@v6
34
37
with :
65
68
- name : Check diff coverage
66
69
if : runner.os != 'Windows'
67
70
run : |
68
- git fetch origin main:refs/remotes/origin/main
69
- diff-cover coverage.xml --compare-branch=origin/main --fail-under=90
71
+ BASE_REF="${{ github.base_ref }}"
72
+ if [ -z "$BASE_REF" ]; then BASE_REF="main"; fi
73
+ git fetch origin "$BASE_REF:refs/remotes/origin/$BASE_REF"
74
+ diff-cover coverage.xml --compare-branch="origin/$BASE_REF" --fail-under=90
70
75
- name : Run E2E tests with Playwright
71
76
id : e2e
72
77
if : runner.os != 'Windows'
You can’t perform that action at this time.
0 commit comments