Skip to content

Merge pull request #20 from atarime/fix-escape-method #6

Merge pull request #20 from atarime/fix-escape-method

Merge pull request #20 from atarime/fix-escape-method #6

Workflow file for this run

name: run-phpstan
on:
push:
branches:
- "*"
pull_request:
branches: [ 'master', 'main' ]
jobs:
run:
name: Run PHPStan
runs-on: 'ubuntu-latest'
strategy:
matrix:
level: [ 0, 1, 2 ]
include:
- current-level: 0
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup PHP
uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2.25.5
with:
php-version: '8.1'
- 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