Skip to content

Laravel 11.x Compatibility #253

Laravel 11.x Compatibility

Laravel 11.x Compatibility #253

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: pcov
- name: Install dependencies
run: composer install
- name: Check platform requirements
run: composer check-platform-reqs
- name: Check for unused dependencies
run: ./vendor/bin/composer-unused
- name: Check for soft dependencies
run: ./vendor/bin/composer-require-checker
- name: PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run
- name: test coverage
run: |
./vendor/bin/phpunit --coverage-clover=coverage.xml
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Infection
# run: ./vendor/bin/infection --min-msi=100
# env:
# INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
- name: PHPStan
run: ./vendor/bin/phpstan
tests:
runs-on: ubuntu-latest
name: "PHP: ${{ matrix.php }}; Prefer: ${{ matrix.prefer }}; PHPUnit: {{ matrix.phpunit }};"
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
phpunit: [^9.0, ^10.0, ^11.0]
laravel: [^9.0, ^10.0, ^11.0]
prefer: [prefer-lowest, prefer-stable]
exclude:
- laravel: ^11.0
php: '8.1'
- phpunit: ^11.0
php: '8.1'
steps:
- name: checkout code
uses: actions/checkout@v3
- 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
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Require dependency version
run: composer require --no-update illuminate/collections:${{ matrix.laravel }} illuminate/contracts:${{ matrix.laravel }} illuminate/log:${{ matrix.laravel }} illuminate/support:${{ matrix.laravel }} illuminate/config:${{ matrix.laravel }} illuminate/container:${{ matrix.laravel }} phpunit/phpunit:${{ matrix.phpunit }}
- name: Install dependencies
run: composer update --${{ matrix.prefer }} --no-scripts
- name: Check platform requirements
run: composer check-platform-reqs
- name: Run tests
run: ./vendor/bin/phpunit