Skip to content

tests

tests #211

Workflow file for this run

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