upgrade php8.3 & L11 #10
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Unit tests back (phpunit) | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: 8.1 | |
env: | |
LARAVEL: 9.* | |
TESTBENCH: 7.* | |
- php: 8.1 | |
env: | |
LARAVEL: 10.* | |
TESTBENCH: 8.* | |
- php: 8.2 | |
env: | |
LARAVEL: 9.* | |
TESTBENCH: 7.* | |
- php: 8.2 | |
env: | |
LARAVEL: 10.* | |
TESTBENCH: 8.* | |
env: ${{ matrix.env }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, dom, fileinfo, mysql | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update --prefer-dist | |
composer update --prefer-stable --prefer-dist --no-interaction | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: ./vendor/bin/phpunit |