Skip to content

Tests

Tests #2337

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
paths:
- '**.php'
- '**.stubphp'
- '**.feature'
- '**.yml'
- 'composer.json'
- '.github/workflows/test.yml'
pull_request:
paths:
- '**.php'
- '**.stubphp'
- '**.feature'
- 'composer.json'
- '.github/workflows/test.yml'
schedule:
- cron: "0 6 * * *"
jobs:
unit_tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
tools: composer:v2
- name: Check Composer configuration
run: composer validate --strict
- name: Install composer dependencies
run: composer install
- name: Run Unit tests
run: composer test:unit
acceptance_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.3, 8.2, 8.1]
laravel: [^11.0, ^10.0]
dependencies: [lowest, highest]
exclude:
- php: 8.1
laravel: ^11.0
name: Type P${{ matrix.php }} | L${{ matrix.laravel }} | ${{ matrix.dependencies == 'highest' && '↑' || '↓' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=256M
coverage: none
tools: composer
- name: Install dependencies from composer.json
run: |
composer require "illuminate/support:${{ matrix.laravel }}" --no-update
composer update --no-interaction --no-progress --prefer-dist --prefer-stable ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }}
- name: Run Psalm/Type tests
run: composer test:type