Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phpstan workflow file #28741

Merged
merged 9 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ concurrency:
cancel-in-progress: true

env:
CACHE_KEY_PART: ${{ github.event_name == 'pull_request' && format('{0}-{1}',
github.base_ref, github.head_ref) || github.ref_name }}
CACHE_KEY_PART: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -57,7 +56,8 @@ jobs:
# Run PHPStan
- name: Run PHPStan
id: phpstan
run: phpstan -vvv analyse --error-format=checkstyle --memory-limit 4G -a build/phpstan/bootstrap_action.php -c phpstan.neon | tee _stan.xml | cs2pr --graceful-warnings
run: |
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
# continue-on-error: true

# Save cache
Expand Down
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,26 @@ doc/install.lock
/composer.json
/composer.lock

# to execute pre-commit
local.sh
# Local script, executed during pre-commit
/local.sh

# Local phpstan configuration
/phpstan.neon
/phpstan-baseline.neon

# Logs
/*.log

# Vim swap files
*.sw?

# Generated by PHPUNIT.BAT
/INI_PHPUNIT

# ignore cache builds
/build/phpstan/phpstan
/build/phpstan/bootstrap_custom.php
phpstan_custom.neon
/.php-cs-fixer.cache
/.php_cs.cache
/.cache
17 changes: 6 additions & 11 deletions phpstan.neon → phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
parameters:
tmpDir: ./.github/tmp
parallel:
jobSize: 8
# Commented some of the settings, reminding the defaults:
# should adapt better to target machines
# jobSize: 8 # default is 20
processTimeout: 600.0
maximumNumberOfProcesses: 20
minimumNumberOfJobsPerProcess: 2
buffer: 134217728 # 128 MB
# maximumNumberOfProcesses: 20 # default is 32
# minimumNumberOfJobsPerProcess: 2 # default is 2
# buffer: 134217728 # 128 MB # Not documented
customRulesetUsed: true
level: 2
fileExtensions:
- php
paths:
- htdocs
- scripts
stubFiles:
# - dev/tools/phan/stubs/GeoIP2.php
# - dev/tools/phan/stubs/geoip_inc.php
- dev/tools/phan/stubs/module_numberwords.php
- dev/tools/phan/stubs/restler.php
- dev/tools/phan/stubs/stripe.php
- dev/tools/phan/stubs/swiss-qr-bill.php
excludePaths:
analyseAndScan:
- htdocs/custom/*
Expand Down
Loading