Merge pull request #119 from askdkc/dependabot/github_actions/dependa… #282
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: run-tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
php: [8.0, 8.1, 8.2, 8.3] | |
laravel: [11.*, 10.*, 9.*] | |
stability: [prefer-stable] | |
include: | |
- laravel: 9.* | |
testbench: 7.* | |
- laravel: 10.* | |
testbench: 8.* | |
- laravel: 11.* | |
testbench: 9.* | |
exclude: | |
- laravel: 10.* | |
php: 8.0 | |
- laravel: 11.* | |
php: 8.0 | |
- laravel: 11.* | |
php: 8.1 | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
coverage: none | |
- name: Set Minimum PHP 8.2 Versions | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer require guzzlehttp/psr7:~2.4 --no-interaction --no-update | |
if: matrix.php >= 8.2 | |
- name: Setup problem matchers | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:^2.64.1" --no-interaction --no-update | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: List Installed Dependencies | |
run: composer show -D | |
- name: Execute tests | |
run: vendor/bin/pest --ci |