name: Static analysis

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  phpstan:
    name: PHPStan
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: PHPStan
        uses: OskarStark/phpstan-ga@0.12.32
        env:
          REQUIRE_DEV: true
        with:
          args: analyze --no-progress
