Skip to content

Commit 447ad11

Browse files
committed
Update tests.yml
1 parent 3dc53c0 commit 447ad11

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ jobs:
267267
> infection.json5
268268
cat infection.json5 | jq
269269
270+
- name: "Determine default branch"
271+
id: default-branch
272+
run: |
273+
echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> $GITHUB_OUTPUT
274+
270275
- name: "Restore result cache"
271276
uses: actions/cache/restore@v4
272277
with:
@@ -277,9 +282,9 @@ jobs:
277282
278283
- name: "Run infection"
279284
run: |
280-
git fetch --depth=1 origin $GITHUB_BASE_REF
285+
git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }}
281286
infection \
282-
--git-diff-base=origin/$GITHUB_BASE_REF \
287+
--git-diff-base=origin/${{ steps.default-branch.outputs.name }} \
283288
--git-diff-lines \
284289
--ignore-msi-with-no-mutations \
285290
--min-msi=100 \

0 commit comments

Comments
 (0)