github-actions(deps): bump shivammathur/setup-php from 2.27.0 to 2.29.0 #678
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] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['8.1', '8.2'] | |
laravel: [10.*] | |
dependency-version: [prefer-stable] | |
include: | |
- laravel: 10.* | |
testbench: 8.* | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl, json, zip | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
- name: Install dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | |
env: | |
APP_ENV: testing | |
- name: Run PHPStan | |
run: ./vendor/bin/phpstan | |
- name: Run tests | |
run: ./vendor/bin/phpunit | |
env: | |
APP_ENV: testing | |
- uses: codecov/codecov-action@v3 | |
name: Push coverage to codecov | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./clover.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true |