Skip to content

Commit

Permalink
Added Laravel 11.x support (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
sertxudev authored Mar 11, 2024
1 parent 5652173 commit 0f79150
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 15 deletions.
62 changes: 53 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *'

jobs:
test:
runs-on: ${{ matrix.os }}
ubuntu:
runs-on: ubuntu-latest

strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: ['9.50', 10]
php: [8.1, 8.2]
laravel: [10, '11']
coverage-driver: [pcov]
stability: [prefer-lowest, prefer-stable]
exclude:
- laravel: '11'
php: 8.1

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

steps:
- name: Checkout code
Expand Down Expand Up @@ -48,3 +49,46 @@ jobs:

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v4

windows:
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
laravel: [10, '11']
coverage-driver: [pcov]
stability: [prefer-lowest, prefer-stable]
exclude:
- laravel: '11'
php: 8.1

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

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

- 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: ${{ matrix.coverage-driver }}

- 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 "illuminate/contracts=${{ matrix.laravel }}.*" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v4
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
}
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^9.5|^10.0",
"illuminate/database": "^9.5|^10.0",
"illuminate/support": "^9.5|^10.0"
"php": "^8.1|^8.2",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/database": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.5|^8.0",
"phpunit/phpunit": "^9.5"
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^9.5|^10.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 0f79150

Please sign in to comment.