Skip to content

Commit c3fa412

Browse files
authored
Tweak PHPStan Job
1 parent b1975d8 commit c3fa412

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.github/workflows/run-phpstan-pull.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,19 @@ jobs:
8686
run: composer update --${{ matrix.stability }} --no-interaction
8787

8888
- name: Install PHPStan
89-
run: composer require larastan/larastan:^2.0 --dev --no-interaction
89+
run: composer require larastan/larastan:^2.0 --no-interaction
9090

91-
- name: Cache Larastan result cache
92-
uses: actions/cache@v4
91+
- uses: actions/cache/restore@v4
92+
id: larastan-restore
9393
with:
94-
path: .phpstan.cache
95-
key: ${{ github.run_id }}-phpstan-result-cache
96-
restore-keys: phpstan-result-cache-
94+
path: ./build/phpstan
95+
key: phpstan-result-cache
9796

9897
- name: Run PHPStan Tests
9998
run: ./vendor/bin/phpstan analyse
99+
100+
- uses: actions/cache/save@v4
101+
id: larastan-save
102+
with:
103+
path: steps.larastan-restore.path
104+
key: steps.larastan-restore.key

.github/workflows/run-phpstan.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,17 @@ jobs:
9191
- name: Install PHPStan
9292
run: composer require larastan/larastan:^2.0 --dev --no-interaction
9393

94-
- name: Cache Larastan result cache
95-
uses: actions/cache@v4
94+
- uses: actions/cache/restore@v4
95+
id: larastan-restore
9696
with:
97-
path: .phpstan.cache
98-
key: ${{ github.run_id }}-phpstan-result-cache
99-
restore-keys: phpstan-result-cache-
97+
path: ./build/phpstan
98+
key: phpstan-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
10099

101100
- name: Run PHPStan Tests
102101
run: ./vendor/bin/phpstan analyse
102+
103+
- uses: actions/cache/save@v4
104+
id: larastan-save
105+
with:
106+
path: steps.larastan-restore.path
107+
key: steps.larastan-restore.key

0 commit comments

Comments
 (0)