Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 12.x Compatibility #2729

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:

jobs:
lint:

runs-on: ubuntu-latest


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


- name: Checking for prtodo's.
run: |
if grep --exclude-dir={.git,.github,vendor} -rE "PRtodo"; then
Expand All @@ -21,6 +25,7 @@ jobs:
echo "All good"
fi


- name: Checking for leftover "ray" usages.
run: |
if grep --exclude-dir={.git,.github,vendor} -rE "ray("; then
Expand All @@ -29,28 +34,35 @@ jobs:
echo "All good"
fi


- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none


- name: Install dependencies
run: |
composer require "laravel/framework:11.*" --no-interaction --no-update
composer install


- name: Execute tests
run: vendor/bin/phpstan


- name: Check code style
run: vendor/bin/phpcs

test:
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - DBAL ${{ matrix.dbal }}

timeout-minutes: 30

runs-on: ${{ matrix.os }}

services:
mysql:
image: mysql:latest
Expand All @@ -61,35 +73,43 @@ jobs:
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1]
laravel: [10.*, 11.*]
dbal: [3.*, 4.*]
laravel: ['10.*', '11.*', '12.*']
dbal: ['3.*', '4.*']
exclude:
- laravel: 10.*
dbal: 4.*
- laravel: 11.*
php: 8.1
- laravel: 11.*
dbal: 3.*
- laravel: 12.*
php: 8.1
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*


steps:
- name: Set timezone?
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Paris"
timezoneLinux: Europe/Paris


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


- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -99,54 +119,66 @@ jobs:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"


- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-


- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update
composer install --prefer-dist --no-interaction --no-plugins


- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '20.x'
node-version: 20.x


- name: Build npm dependencies.
run: |
npm ci


- name: Create blocks dir
run: |
mkdir ./frontend/js/components/blocks/customs


- name: Build twill.
run: ./vendor/bin/testbench twill:build --forTesting
env:
CACHE_STORE: array


- name: Upgrade Chrome
uses: browser-actions/setup-chrome@latest


- name: Upgrade Chrome Driver
run: ./vendor/bin/testbench dusk:chrome-driver --detect


- name: Prepare Testbench Dusk
run: ./vendor/bin/testbench-dusk package:discover


- name: Execute all tests
run: vendor/bin/phpunit --stop-on-error
env:
Expand All @@ -156,17 +188,20 @@ jobs:
with:
files: .github/clover.xml


- name: Replace asterisks in Laravel
run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV
env:
MATRIX_LARAVEL: ${{ matrix.laravel }}


- name: Replace asterisks in DBAL
id: replace_dbal
run: echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV
env:
MATRIX_DBAL: ${{ matrix.dbal }}


- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
Loading
Loading