Feat/adds laravel 11 support #140
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: Template - Laravel package | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- features/** | |
pull_request: | |
branches: [ main, dev ] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '8.3','8.2','8.1' ] | |
dependency-stability: [ 'prefer-none' ] | |
laravel: [ '11.*','10.*','9.*' ] | |
include: | |
- laravel: 11.* | |
testbench: 9.* | |
- laravel: 10.* | |
testbench: 8.* | |
- laravel: 9.* | |
testbench: 7.* | |
env: | |
extensions: mbstring, dom, fileinfo, openssl, json, imagick, swoole, sqlite3 | |
name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP versions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Testing Composer version | |
run: | | |
composer -V | |
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}" | |
- name: Install Laravel Dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update | |
composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest | |
- name: Update Dependencies with latest stable | |
if: matrix.dependency-stability == 'prefer-stable' | |
run: composer update --prefer-stable | |
- name: Update Dependencies with lowest stable | |
if: matrix.dependency-stability == 'prefer-lowest' | |
run: composer update --prefer-stable --prefer-lowest | |
- name: Show dir | |
run: pwd | |
- name: PHP Version | |
run: php --version | |
# Code quality | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: | | |
vendor/bin/testbench package:test |