chore: ignore laravel/framework advisory in composer audit for testing #7
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: Run Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.2', '8.3', '8.4', '8.5'] | |
| laravel: ['11.*', '12.*', '13.*'] | |
| exclude: | |
| # Laravel 11 constraints (PHP 8.2 - 8.4) | |
| - laravel: '11.*' | |
| php: '8.5' | |
| # Laravel 13 constraints (PHP 8.3+) | |
| - laravel: '13.*' | |
| php: '8.2' | |
| name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: curl, json, libxml, mbstring | |
| coverage: none | |
| - name: Install dependencies | |
| run: | | |
| if [ "${{ matrix.php }}" != "8.2" ] || [ "${{ matrix.laravel }}" != "11.*" ]; then | |
| composer remove --dev vimeo/psalm phpstan/phpstan laravel/pint rector/rector --no-interaction --no-update | |
| fi | |
| composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update | |
| composer update --prefer-dist --no-interaction --no-progress --no-security-blocking | |
| - name: Validate composer.json | |
| run: composer validate | |
| - name: Run PHPUnit tests | |
| run: vendor/bin/phpunit | |
| - name: Run PHPStan analysis | |
| if: matrix.php == '8.2' && matrix.laravel == '11.*' | |
| run: vendor/bin/phpstan analyse | |
| - name: Run Psalm analysis | |
| if: matrix.php == '8.2' && matrix.laravel == '11.*' | |
| run: vendor/bin/psalm --no-cache | |
| - name: Check Pint code style | |
| if: matrix.php == '8.2' && matrix.laravel == '11.*' | |
| run: vendor/bin/pint --test |