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 authored Apr 1, 2024
2 parents 2f1dd56 + 24edbbe commit 783182b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 43 deletions.
92 changes: 52 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,57 @@
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]
laravel: [8.*]
stability: [prefer-lowest, prefer-stable]
include:
- 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.2']
laravel: ['8.*', '11.*']
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: ^6.6
- laravel: 11.*
testbench: ^9.0
exclude:
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 8.0

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
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
],
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^8.0|^9.0|^10.0"
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^6.0|^7.0",
"orchestra/testbench": "^6.0|^7.0|^9.0",
"phpunit/phpunit": "^9.0|^10.0"
},
"autoload": {
Expand All @@ -46,7 +46,6 @@
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

},
"config": {
"sort-packages": true
Expand Down

0 comments on commit 783182b

Please sign in to comment.