Skip to content

Test

Test #408

Workflow file for this run

name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
laravel:
- "^9.0"
- "^10.0"
- "^11.0"
stability:
- lowest
- stable
include:
- current: 1
php: "8.3"
laravel: "^10.0"
stability: stable
- option: --ignore-platform-req=php
php: "8.4"
- unstable: 1
laravel: "^11.0"
exclude:
- laravel: "^11.0"
php: "8.1"
- laravel: "^11.0"
stability: lowest
name: PHP:${{ matrix.php }} / Laravel:${{ matrix.laravel }} / ${{ matrix.stability }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Install Composer dependencies
run: composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --ansi
- name: Set minimum stability
if: ${{ matrix.unstable }}
run: composer config minimum-stability dev --ansi
- name: Uninstall the package that is not compatible with Laravel 11
if: ${{ matrix.unstable }}
run: composer remove --dev vyuldashev/laravel-openapi --no-interaction --no-update
- name: Install Composer dependencies
run: composer update --prefer-${{ matrix.stability }} ${{ matrix.option }} --no-interaction --no-progress --ansi
- name: Run Code Format Check
if: ${{ matrix.current }}
run: vendor/bin/php-cs-fixer check --show-progress=none --ansi
- name: Run Static Analysis
if: ${{ matrix.current }}
run: vendor/bin/phpstan analyze --no-progress --ansi
- name: Run Unit tests
run: vendor/bin/phpunit --colors=always