summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg <supahgreg@users.noreply.github.com>2025-10-11 00:51:15 -0500
committerGitHub <noreply@github.com>2025-10-11 00:51:15 -0500
commitdf4630b316f468c772fb4edc7e1dc0a46765542f (patch)
treea75676de872e2182a6363a506aab3fa0097734ca
parent4c73941607dae8d12e3b555cda9d46cf11563779 (diff)
parent5c941e663df8a9b9273f0cdf7803db70078ab56d (diff)
Merge pull request #38 from tt-rss/feature/phpstan-perf
Cache PHPStan results, drop 'parallel.maximumNumberOfProcesses' param.
-rw-r--r--.github/workflows/php-code-quality.yml18
-rw-r--r--phpstan.neon2
2 files changed, 18 insertions, 2 deletions
diff --git a/.github/workflows/php-code-quality.yml b/.github/workflows/php-code-quality.yml
index 5e1f7c2d7..6be750081 100644
--- a/.github/workflows/php-code-quality.yml
+++ b/.github/workflows/php-code-quality.yml
@@ -37,9 +37,27 @@ jobs:
# PHPUnit is installed to support PHPStan checking tests/
tools: phpstan/phpstan:2.1.31, phpunit/phpunit:9.6.29
+ # https://phpstan.org/user-guide/result-cache
+ - name: Restore result cache
+ uses: actions/cache/restore@v4
+ with:
+ path: .phpstan-tmp
+ key: phpstan-result-cache-${{ github.run_id }}
+ restore-keys: |
+ phpstan-result-cache-
+
- name: Run PHPStan
run: phpstan analyze --no-progress
+ # https://phpstan.org/user-guide/result-cache
+ - name: Save result cache
+ uses: actions/cache/save@v4
+ if: ${{ !cancelled() }}
+ with:
+ # same as in phpstan.neon
+ path: .phpstan-tmp
+ key: phpstan-result-cache-${{ github.run_id }}
+
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
diff --git a/phpstan.neon b/phpstan.neon
index 5bd18c58d..fb6625bb7 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,8 +1,6 @@
parameters:
level: 6
tmpDir: .phpstan-tmp
- parallel:
- maximumNumberOfProcesses: 4
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# set_include_path detection issue