Update run-tests.yml #40
This file contains hidden or 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: Cross-Platform Package Tests | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4] | ||
laravel: [8, 9, 10, 11] | ||
stability: [prefer-lowest, prefer-stable] | ||
steps: | ||
- name: Check PHP/Laravel compatibility | ||
if: | | ||
(matrix.laravel == 8 && matrix.php not in ['7.4', '8.0', '8.1']) || | ||
(matrix.laravel == 9 && matrix.php not in ['8.0', '8.1', '8.2']) || | ||
(matrix.laravel == 10 && matrix.php not in ['8.1', '8.2', '8.3']) || | ||
(matrix.laravel == 11 && matrix.php not in ['8.2', '8.3', '8.4']) | ||
run: exit 0 # Skip incompatible versions | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, json, xml | ||
coverage: none | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
Check failure on line 38 in .github/workflows/run-tests.yml
|
||
composer require --no-update laravel/framework:${{ matrix.laravel }}.* | ||
composer require --no-update orchestra/testbench:${{ matrix.laravel - 2 }}.* | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: Run tests with Pest | ||
run: vendor/bin/pest |