Skip to content

Commit

Permalink
add Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed May 24, 2024
1 parent a4748ae commit 6eafb67
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 32 deletions.
64 changes: 38 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tests

on: [ push, pull_request ]
on: [push, pull_request]

jobs:
test:
Expand All @@ -9,55 +9,67 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [8.0, 8.1, 8.2]
laravel: [ 9.*, 10.* ]
dependency-version: [ prefer-stable ]
exclude:
- laravel: 10.*
php: 8.0
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2, 8.3]
stability: [prefer-stable]
laravel: [9.*, 10.*, 11.*]
include:
- laravel: 9.*
testbench: 7.*

- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
- laravel: 11.*
testbench: 9.*
exclude:
- php: 8.0
laravel: 10.*

- php: 8.0
laravel: 11.*

- php: 8.1
laravel: 11.*

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

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

- name: 🏗 Setup Meilisearch
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key="1234" --no-analytics

- name: Setup PHP
- name: 🏗 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, exif
coverage: pcov

- name: Get composer cache directory
- name: 🏗 Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
- name: 🏗 Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}-
key: dependencies-composer-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }}
restore-keys: dependencies-composer-laravel-${{ matrix.laravel }}-

- name: Install dependencies
- name: 📦 Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
composer update --prefer-dist --no-interaction --no-progress --${{ matrix.stability }}
- name: Execute tests
- name: 🧪 Execute tests
run: vendor/bin/phpunit -c phpunit.coverage.dist.xml

- name: Deploy coverage to codacy
uses: codacy/codacy-coverage-reporter-action@v1
- name: 🚀 Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
api-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
files: ./clover.xml
fail_ci_if_error: true
# verbose: true
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
}
],
"require": {
"php": "^8.0|^8.1|^8.2",
"illuminate/database": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0"
"php": "^8.0",
"illuminate/database": "^9.0 || ^10.0 || ^11.0",
"illuminate/support": "^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.0|^8.0",
"nunomaduro/larastan": "^2.0",
"larastan/larastan": "^2.0",
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.0|^10.0"
"phpunit/phpunit": "^9.0 || ^10.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 6eafb67

Please sign in to comment.