Skip to content

Commit

Permalink
Merge pull request #26 from laravel-shift/l11-compatibility
Browse files Browse the repository at this point in the history
Laravel 11.x Compatibility
  • Loading branch information
victorybiz committed Apr 1, 2024
2 parents 1d43174 + adb0a6d commit 64db0eb
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 45 deletions.
98 changes: 56 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,61 @@
name: run-tests

on:
push:
branches: [master]
pull_request:
branches: [master]
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.4, 8.0, 8.1]
laravel: [8.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: ^8.0
- laravel: 8.*
testbench: ^6.6

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- 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, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.4, 8.0, 8.1, '8.2']
laravel: ['8.*', '10.*', '11.*']
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: ^8.0
- laravel: 8.*
testbench: ^6.6
- laravel: 11.*
testbench: ^9.0
exclude:
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- 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, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
],
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"livewire/livewire": "^2.4|^3.0"
},
"require-dev": {
"orchestra/testbench": "^6.0|^8.0",
"phpunit/phpunit": "^9.0"
"orchestra/testbench": "^6.0|^8.0|^9.0",
"phpunit/phpunit": "^9.0|^10.5"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 64db0eb

Please sign in to comment.