Fix CI tests and drop Laravel 8 support #66
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Test | |
on: | |
pull_request: | |
branches: | |
- master | |
- main | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.0, 8.1] | |
laravel: [8.*, 9.*, 10.*] | |
dependency-version: [prefer-lowest, prefer-stable] | |
include: | |
- dbal: ignore | |
- laravel: 8.* | |
testbench: ^6.0 | |
dbal: install | |
exclude: | |
- laravel: 10.* | |
php: 8.0 | |
name: PHP${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{matrix.php}} | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
# Use composer.json for key, if composer.lock is not committed. | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update | |
if [[ ${{matrix.dbal}} = 'install' ]]; then composer require doctrine/dbal; fi | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | |
- name: Run PHPUnit tests | |
run: | | |
vendor/bin/phpunit --testdox |