chore: Add CI #2
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| phpcs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP with extensions | |
| uses: shivammathur/setup-php@v2 | |
| - uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--prefer-dist" | |
| - name: Run PHP CS Fixer | |
| run: vendor/bin/php-cs-fixer check | |
| phpstan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP with extensions | |
| uses: shivammathur/setup-php@v2 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--prefer-dist" | |
| - name: Run PHPStan | |
| run: composer run-script phpstan | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - "8.3" | |
| - "8.4" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: 'Setup PHP' | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| - uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--prefer-dist" | |
| - name: Run tests | |
| run: composer run-script test |