Skip to content

Commit 5cd38c6

Browse files
committed
#1930 add PHPStan to the coding-standards Github Workflow
1 parent eed5e75 commit 5cd38c6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/coding-standards.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,32 @@ jobs:
7272
tools: composer:v2
7373
coverage: none
7474

75+
- name: Cache dependencies
76+
id: composer-cache
77+
uses: actions/cache@v3
78+
with:
79+
path: ./vendor
80+
key: composer-${{ hashFiles('**/composer.lock') }}
81+
7582
- name: Install dependencies
7683
run: composer install
7784

85+
- name: Restore cache PHPStan results
86+
id: phpstan-cache-restore
87+
uses: actions/cache/restore@v3
88+
with:
89+
path: .cache
90+
key: "phpstan-result-cache-${{ github.run_id }}"
91+
restore-keys: |
92+
phpstan-result-cache-
93+
7894
- name: Run PHPStan
7995
run: ./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi
96+
97+
- name: Save cache PHPStan results
98+
id: phpstan-cache-save
99+
if: always()
100+
uses: actions/cache/save@v3
101+
with:
102+
path: .cache
103+
key: ${{ steps.phpstan-cache-restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)