Skip to content

support laravel 11 (#7) #19

support laravel 11 (#7)

support laravel 11 (#7) #19

Workflow file for this run

name: Run PHPUnit
on: [push, pull_request]
jobs:
phpunit:
name: PHPUnit (PHP ${{ matrix.php-version }}, Laravel ${{ matrix.laravel-constraint }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.2'
laravel-constraint: '^9.0'
- php-version: '8.2'
laravel-constraint: '^10.0'
- php-version: '8.2'
laravel-constraint: '^11.0'
- php-version: '8.3'
laravel-constraint: '^11.0'
- php-version: '8.4'
laravel-constraint: '^11.0'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
- name: Get Composer cache dir
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-constraint }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-constraint }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Apply version constraints
run: composer update --with illuminate/support:${{ matrix.laravel-constraint }}
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=clover.xml
- name: Publish coverage
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: clover.xml