Skip to content

update

update #115

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
laravel: ['10.*', '11.*', '12.*']
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 8.1
name: P${{ matrix.php }} / L${{ matrix.laravel }} / ${{ matrix.dependency-version }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: fast_paginate
MYSQL_HOST: 127.0.0.1
MYSQL_USER: test
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-l${{ matrix.laravel }}-v${{ matrix.dependency-version }}-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, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
run: |
composer config minimum-stability dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --dev
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit