Skip to content

Release version of Ver.32. #118

Release version of Ver.32.

Release version of Ver.32. #118

Workflow file for this run

name: PHPStan
on:
push:
branches:
- "*"
pull_request:
branches: [ 'master', 'main' ]
pull_request_target:
types:
- closed
jobs:
run:
name: Run PHPStan
runs-on: 'ubuntu-latest'
strategy:
matrix:
level: [ 1, 2 ]
include:
- current-level: 1
- max-level: 2
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: '8.4'
- name: Remove phpDocumentor temporarily and Install PHPStan
run: composer remove --dev --no-update phpdocumentor/phpdocumentor; composer update
- name: Restore cached baseline for PHPStan
id: cache-baseline-restore
uses: actions/cache/restore@v4
with:
path: |
test/phpstan-baseline.neon
key: phpstan-baseline-${{ github.run_id }}"
restore-keys: |
phpstan-baseline-
- name: Run PHPStan
if: matrix.level == matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse --memory-limit 1G -c test/phpstan.neon src test -l "${{ matrix.level }}"
- name: Run PHPStan
if: matrix.level > matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse --memory-limit 1G -c test/phpstan.neon src test -l "${{ matrix.level }}"
exit 0
- name: Generate the baseline for PHPStan
if: matrix.level == matrix.max-level && github.event.pull_request.merged == true
continue-on-error: true
run: |
./vendor/bin/phpstan analyse --memory-limit 1G -c test/phpstan.neon --generate-baseline test/phpstan-baseline.neon src test -vvv --debug -l "${{ matrix.level }}"
exit 0
- name: Save the baseline for PHPStan
id: cache-baseline-save
if: matrix.level == matrix.max-level && github.event.pull_request.merged == true
uses: actions/cache/save@v4
with:
path: |
test/phpstan-baseline.neon
key: phpstan-baseline-${{ github.run_id }}"