Merge pull request #20 from atarime/fix-escape-method #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |