Fix doc #491
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| # Unit tests back (phpunit) | |
| laravel-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - php: 8.3 | |
| env: | |
| LARAVEL: 11.* | |
| TESTBENCH: 9.* | |
| - php: 8.4 | |
| env: | |
| LARAVEL: 11.* | |
| TESTBENCH: 9.* | |
| - php: 8.5 | |
| env: | |
| LARAVEL: 11.* | |
| TESTBENCH: 9.* | |
| - php: 8.3 | |
| env: | |
| LARAVEL: 12.* | |
| TESTBENCH: 10.* | |
| - php: 8.4 | |
| env: | |
| LARAVEL: 12.* | |
| TESTBENCH: 10.* | |
| - php: 8.5 | |
| env: | |
| LARAVEL: 12.* | |
| TESTBENCH: 10.* | |
| env: ${{ matrix.env }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, dom, fileinfo, mysql | |
| - name: Setup locales | |
| run: sudo locale-gen fr_FR.UTF-8 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: | | |
| composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update | |
| composer update --prefer-stable --prefer-dist --no-interaction | |
| - name: Run Security Audit | |
| run: composer audit | |
| - name: Execute tests via Pest | |
| run: ./vendor/bin/pest --parallel | |
| - uses: 8398a7/[email protected] | |
| if: failure() && github.event_name == 'push' | |
| with: | |
| status: failure | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |