CI Static Analysis #1437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CI Static Analysis" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - '1.x' | |
| schedule: | |
| - cron: '0 0 * * *' | |
| env: | |
| PHPUNIT_FLAGS: "-v" | |
| SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit" | |
| jobs: | |
| composer-validate: | |
| name: "Validate composer.json" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout code | |
| uses: "actions/checkout@v4" | |
| - | |
| name: Validate composer.json | |
| run: "composer validate --strict --no-check-lock" | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: "actions/checkout@v4" | |
| - name: Install PHP | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: 8.2 | |
| - name: Install Composer Dependencies | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--no-scripts" | |
| - name: Install PHPStan | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--no-scripts --working-dir=tools/phpstan" | |
| - name: Install Optional Dependencies | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--no-scripts --working-dir=tools/phpstan/includes" | |
| - name: Install PHPUnit | |
| run: "vendor/bin/simple-phpunit --version" | |
| - name: Run PHPStan | |
| run: "tools/phpstan/vendor/bin/phpstan analyze --memory-limit=1G --error-format=github" |