Skip to content

Commit 971df8b

Browse files
committed
simplify result cache handling
1 parent 0645768 commit 971df8b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,13 @@ jobs:
195195
--mutator-class='PHPStan\Infection\TrinaryLogicMutator' \
196196
> infection.json5
197197
198-
- uses: "actions/download-artifact@v4"
198+
- name: "Cache Result cache"
199+
uses: actions/cache@v4
199200
with:
200-
name: "result-cache-${{ matrix.php-version }}"
201-
path: "tmp/"
201+
path: ./tmp
202+
key: "result-cache-v14-${{ matrix.php-version }}-${{ github.run_id }}"
203+
restore-keys: |
204+
result-cache-v14-${{ matrix.php-version }}-
202205
203206
- name: "Run infection"
204207
run: |
@@ -257,9 +260,3 @@ jobs:
257260

258261
- name: "PHPStan"
259262
run: "make phpstan"
260-
261-
- uses: "actions/upload-artifact@v4"
262-
with:
263-
# "update-packages" is not relevant for the download-artifact counterpart, but we need it here to get unique artifact names across all jobs
264-
name: "result-cache-${{ matrix.php-version }}${{ matrix.update-packages && '-packages-updated' || '' }}"
265-
path: "tmp/resultCache.php"

0 commit comments

Comments
 (0)