Skip to content

tests

tests #1392

Workflow file for this run

name: tests
on:
push:
branches:
- 'main'
- 'master'
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.1, 8.2, 8.3 ]
illuminate: [^10.0, ^11.0]
stability: [prefer-lowest, prefer-stable]
include:
- illuminate: ^10.0
testbench: 8.*
- illuminate: ^11.0
testbench: 9.*
exclude:
- php: 8.1
illuminate: ^11.0
name: P${{ matrix.php }} - I${{ matrix.illuminate }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-illuminate-${{ matrix.illuminate }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.illuminate }}" --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit