name: Static Analysis

on: pull_request

jobs:
  phpstan:
    name: phpstan
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Configure PHP environment
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.0'
      - uses: ramsey/composer-install@v2
        with:
          composer-options: "--ignore-platform-reqs --optimize-autoloader"
      - name: Run PHPStan
        run: composer test:analysis
