|
| 1 | +name: "CI Static Analysis" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - 'main' |
| 8 | + schedule: |
| 9 | + - cron: '0 0 * * *' |
| 10 | + |
| 11 | +env: |
| 12 | + PHPUNIT_FLAGS: "-v" |
| 13 | + SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit" |
| 14 | + |
| 15 | +jobs: |
| 16 | + coding-standards: |
| 17 | + name: "Coding Standards" |
| 18 | + |
| 19 | + runs-on: ubuntu-latest |
| 20 | + |
| 21 | + steps: |
| 22 | + - |
| 23 | + name: Checkout code |
| 24 | + uses: "actions/checkout@v3" |
| 25 | + |
| 26 | + - |
| 27 | + name: Install PHP |
| 28 | + uses: "shivammathur/setup-php@v2" |
| 29 | + |
| 30 | + - |
| 31 | + name: Validate composer.json |
| 32 | + run: "composer validate --strict --no-check-lock" |
| 33 | + |
| 34 | + - |
| 35 | + name: Composer install |
| 36 | + uses: "ramsey/composer-install@v2" |
| 37 | + with: |
| 38 | + composer-options: "--no-scripts" |
| 39 | + |
| 40 | + - |
| 41 | + name: Composer install php-cs-fixer |
| 42 | + uses: "ramsey/composer-install@v2" |
| 43 | + with: |
| 44 | + composer-options: "--no-scripts --working-dir=tools/php-cs-fixer" |
| 45 | + |
| 46 | + - |
| 47 | + name: Run PHP-CS-Fixer |
| 48 | + run: "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff" |
| 49 | + |
| 50 | + phpstan: |
| 51 | + name: PHPStan |
| 52 | + |
| 53 | + runs-on: ubuntu-latest |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: "actions/checkout@v4" |
| 58 | + |
| 59 | + - name: Install PHP |
| 60 | + uses: "shivammathur/setup-php@v2" |
| 61 | + |
| 62 | + - name: Install Composer Dependencies |
| 63 | + uses: "ramsey/composer-install@v2" |
| 64 | + with: |
| 65 | + composer-options: "--no-scripts" |
| 66 | + |
| 67 | + - name: Install PHPStan |
| 68 | + uses: "ramsey/composer-install@v2" |
| 69 | + with: |
| 70 | + composer-options: "--no-scripts --working-dir=tools/phpstan" |
| 71 | + |
| 72 | + - name: Install Optional Dependencies |
| 73 | + uses: "ramsey/composer-install@v2" |
| 74 | + with: |
| 75 | + composer-options: "--no-scripts --working-dir=tools/phpstan/includes" |
| 76 | + |
| 77 | + - name: Install PHPUnit |
| 78 | + run: "vendor/bin/simple-phpunit --version" |
| 79 | + |
| 80 | + - name: Run PHPStan |
| 81 | + run: "tools/phpstan/vendor/bin/phpstan analyze --memory-limit=1G --error-format=github" |
0 commit comments