File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,13 @@ jobs:
207207 > infection.json5
208208 cat infection.json5 | jq
209209
210- - name : " Cache Result cache"
211- uses : actions/cache@v4
210+ - name : " Determine default branch"
211+ id : default-branch
212+ run : |
213+ echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> $GITHUB_OUTPUT
214+
215+ - name : " Restore result cache"
216+ uses : actions/cache/restore@v4
212217 with :
213218 path : ./tmp
214219 key : " result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"
@@ -217,13 +222,20 @@ jobs:
217222
218223 - name : " Run infection"
219224 run : |
220- git fetch --depth=1 origin $GITHUB_BASE_REF
225+ git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }}
221226 infection \
222- --git-diff-base=origin/$GITHUB_BASE_REF \
227+ --git-diff-base=origin/${{ steps.default-branch.outputs.name }} \
223228 --git-diff-lines \
224229 --ignore-msi-with-no-mutations \
225230 --min-msi=100 \
226231 --min-covered-msi=100 \
227232 --log-verbosity=all \
228233 --debug \
229234 --logger-text=php://stdout
235+
236+ - name : " Save result cache"
237+ uses : actions/cache/save@v4
238+ if : ${{ !cancelled() }}
239+ with :
240+ path : ./tmp
241+ key : " result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"
Original file line number Diff line number Diff line change @@ -26,4 +26,4 @@ cs-fix:
2626
2727.PHONY : phpstan
2828phpstan :
29- php vendor/bin/phpstan analyse -l 8 - c phpstan.neon src tests
29+ php vendor/bin/phpstan analyse -c phpstan.neon src tests
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ includes:
55 - vendor/phpstan/phpstan-phpunit/extension.neon
66
77parameters :
8+ level : 8
89 resultCachePath : tmp/resultCache.php
910
1011 excludePaths :
You can’t perform that action at this time.
0 commit comments