SanderSander/composer-link

View on GitHub
.github/workflows/phpstan.yml

Summary

Maintainability
Test Coverage
name: Code Static Analysis

on:
  push:
    branches:
      - master
      - v*
  pull_request:
    types:
      - synchronize
      - opened

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.3'

      - name: Validate composer.json
        run: composer validate --strict

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress

      - name: Run static analyse
        run: ./vendor/bin/phpstan analyse --memory-limit=2G --error-format=github