Speed up PHPStan analysis with result caching

Configure a project-local result cache directory so PHPStan only
re-analyses files that changed. In CI, persist the cache across
runs with actions/cache and suppress progress output.
This commit is contained in:
Chirag Aggarwal 2026-04-01 12:00:32 +05:30
parent 1f6b9d94bf
commit 358f1b78a8
3 changed files with 11 additions and 1 deletions

View file

@ -150,8 +150,16 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Cache PHPStan result cache
uses: actions/cache@v4
with:
path: .phpstan-cache
key: phpstan-${{ github.sha }}
restore-keys: |
phpstan-
- name: Run PHPStan
run: composer analyze
run: ./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G --no-progress
locale:
name: Checks / Locale

1
.gitignore vendored
View file

@ -21,6 +21,7 @@ appwrite.config.json
/app/config/specs/
/docs/examples/
.phpunit.cache
.phpstan-cache
playwright-report
test-results
docker-compose.web-installer.yml

View file

@ -3,6 +3,7 @@ includes:
parameters:
level: 3
tmpDir: .phpstan-cache
paths:
- src
- app