Skip to content

Merge pull request #45 from emic/update-readme #44

Merge pull request #45 from emic/update-readme

Merge pull request #45 from emic/update-readme #44

Workflow file for this run

name: PHPStan
on:
push:
branches:
- "*"
pull_request:
branches: [ 'master', 'main' ]
jobs:
run:
name: PHPStan (Level ${{ matrix.level }})
runs-on: 'ubuntu-latest'
strategy:
matrix:
level: [ 0, 1, 2 ]
include:
- current-level: 0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: '8.4'
- name: Install PHPStan
run: |
composer require --dev phpstan/phpstan
composer require --dev szepeviktor/phpstan-wordpress
composer update --classmap-authoritative
- name: Run PHPStan
if: matrix.level == matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse -c tests/phpstan.neon -l "${{ matrix.level }}" --memory-limit 1024M
exit 0
- name: Run PHPStan
if: matrix.level > matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse -c tests/phpstan.neon -l "${{ matrix.level }}" --memory-limit 1024M
exit 0