name: PHPStan

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  phpstan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "7.1"
          tools: composer:v2

      - name: "Install dependencies with Composer"
        uses: "ramsey/composer-install@v2"

      - name: PHPStan analysis
        run: make stan
