add phpstan

This commit is contained in:
Tac Tacelosky 2021-11-30 07:51:46 -05:00
parent 823f0d8d89
commit f782aae4f7
3 changed files with 56 additions and 1 deletions

18
.github/workflows/php-cs-fixer.yaml vendored Normal file
View file

@ -0,0 +1,18 @@
name: "Linter: PHP"
on:
pull_request:
paths:
- '**.php'
jobs:
php-cs-fixer:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --dry-run

30
.github/workflows/phpstan.yaml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Static analysis - phpstan
on:
pull_request:
paths:
- '**.php'
jobs:
phpstan:
runs-on: ubuntu-20.04
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: "json,memcached"
ini-values: "memory_limit=-1"
coverage: none
- name: Checkout target branch
uses: actions/checkout@v2
- name: 'Install project dependencies'
run: |
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
- name: phpstan
run: |
./vendor/bin/phpstan --no-interaction --no-progress

View file

@ -40,10 +40,17 @@ jobs:
php-version: "8.0"
deps: "normal"
- symfony-require: "5.4.*"
php-version: "8.1"
deps: "normal"
- symfony-require: "6.0.*"
php-version: "8.0"
deps: "dev"
deps: "normal"
- symfony-require: "6.0.*"
php-version: "8.1"
deps: "normal"
fail-fast: true