tests #211
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: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.2, 8.3, 8.4, 8.5] | |
| framework: [^12.0, ^13.0] | |
| stability: [prefer-lowest, prefer-stable] | |
| include: | |
| - framework: ^12.0 | |
| testbench: 10.* | |
| phpunit: ^11.5 | |
| - framework: ^13.0 | |
| testbench: 11.* | |
| phpunit: ^11.5 | |
| exclude: | |
| - php: 8.2 | |
| framework: ^13.0 | |
| name: P${{ matrix.php }} - L${{ matrix.framework }} - ${{ matrix.stability }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, libxml, mbstring, xml, xmlwriter, zip | |
| coverage: none | |
| - name: Add Nova credentials loaded from env | |
| run: composer config http-basic.nova.laravel.com "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}" | |
| - name: Install dependencies | |
| run: | | |
| composer require "laravel/framework:${{ matrix.framework }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update | |
| composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
| - name: Execute tests | |
| run: vendor/bin/phpunit | |
| tests-required: | |
| name: Tests Required | |
| runs-on: ubuntu-latest | |
| if: ${{ always() }} | |
| needs: | |
| - tests | |
| steps: | |
| - name: Verify test matrix completed successfully | |
| run: | | |
| if [ "${{ needs.tests.result }}" != "success" ]; then | |
| echo "Test matrix result: ${{ needs.tests.result }}" | |
| exit 1 | |
| fi |