Merge pull request #41 from minvws/add-laravel-11 #146
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: Continuous Integration | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ 8.1, 8.2, 8.3 ] | |
laravel: [ 10.*, 11.* ] | |
stability: [ prefer-stable ] | |
experimental: [ false ] | |
include: | |
- laravel: 10.* | |
testbench: 8.* | |
- laravel: 11.* | |
testbench: 9.* | |
exclude: | |
- php: 8.1 | |
laravel: 11.* | |
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Install dependencies | |
if: "${{ matrix.experimental == false }}" | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: Install dependencies (experimental) | |
if: "${{ matrix.experimental == true }}" | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev --ignore-platform-reqs | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ignore-platform-reqs | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Execute tests (Unit and Feature) | |
run: vendor/bin/phpunit | |
- name: Static analysis with PHPStan | |
run: vendor/bin/phpstan analyse | |
- name: Static analysis with Psalm | |
if: "${{ matrix.experimental == false }}" | |
run: vendor/bin/psalm | |
- name: Coding style PSR12 Check | |
run: vendor/bin/phpcs |