Skip to content

Commit d5d9fa8

Browse files
committed
Use a simpler approach to fetching base_ref in mutation tests PRs
Ref: jasonkarns/checkout@11d9aa9 Signed-off-by: Marco Pivetta <[email protected]>
1 parent 27a46b0 commit d5d9fa8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/mutation-tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ jobs:
2121
- "ubuntu-latest"
2222

2323
steps:
24-
- name: "Checkout github.base_ref branch (for diffing)"
25-
uses: "actions/checkout@v2"
26-
with:
27-
ref: ${{ github.base_ref }}
28-
2924
- name: "Checkout"
3025
uses: "actions/checkout@v2"
3126

27+
- name: "Fetch github.base_ref (for diffing)"
28+
run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}
29+
3230
- name: "Install PHP"
3331
uses: "shivammathur/setup-php@v2"
3432
with:
@@ -62,9 +60,7 @@ jobs:
6260
vendor/bin/roave-infection-static-analysis-plugin \
6361
--ignore-msi-with-no-mutations \
6462
--git-diff-filter=AM \
65-
--git-diff-base=$GITHUB_BASE_REF
63+
--git-diff-base=origin/${{ github.base_ref }}
6664
env:
6765
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
6866
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
69-
GITHUB_BASE_REF: ${{ github.base_ref }}
70-

0 commit comments

Comments
 (0)