Skip to content

Add phpstan to gh actions #37

Add phpstan to gh actions

Add phpstan to gh actions #37

Workflow file for this run

name: build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '7.3', '7.4', '8.0', '8.1', '8.2' ]
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ast
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run test suite
run: composer test
- name: Run phan
run: composer phan
- name: phan analysis
run: cat analysis.txt
if: failure()
- name: PHPStan
run: vendor/bin/phpstan analyse -l 8 --error-format=github src tests