Skip to content

Commit 834c554

Browse files
committed
Update run-tests.yml
1 parent ab8233b commit 834c554

File tree

1 file changed

+22
-35
lines changed

1 file changed

+22
-35
lines changed

.github/workflows/run-tests.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,44 @@
1-
name: Tests
1+
name: Cross-Platform Package Tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
68
test:
79
runs-on: ${{ matrix.os }}
810
strategy:
9-
fail-fast: true
11+
fail-fast: false
1012
matrix:
1113
os: [ubuntu-latest, windows-latest]
12-
php: [7.4, 8.0, 8.1, 8.2, 8.3]
13-
laravel: [8.*, 9.*, 10.*, 11.*]
14+
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
15+
laravel: [8, 9, 10, 11]
1416
stability: [prefer-lowest, prefer-stable]
15-
include:
16-
# Laravel 8 requires PHP >=7.4
17-
- php: 7.4
18-
laravel: 8.*
19-
testbench: 6.*
20-
# Laravel 9 requires PHP >=8.0
21-
- php: 8.0
22-
laravel: 9.*
23-
testbench: 7.*
24-
# Laravel 10 requires PHP >=8.1
25-
- php: 8.1
26-
laravel: 10.*
27-
testbench: 8.*
28-
# Laravel 11 requires PHP >=8.2
29-
- php: 8.2
30-
laravel: 11.*
31-
testbench: 9.*
32-
33-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3417

3518
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v2
38-
39-
- name: Setup PHP
19+
- name: Check PHP/Laravel compatibility
20+
if: |
21+
(matrix.laravel == 8 && matrix.php not in ['7.4', '8.0', '8.1']) ||
22+
(matrix.laravel == 9 && matrix.php not in ['8.0', '8.1', '8.2']) ||
23+
(matrix.laravel == 10 && matrix.php not in ['8.1', '8.2', '8.3']) ||
24+
(matrix.laravel == 11 && matrix.php not in ['8.2', '8.3', '8.4'])
25+
run: exit 0 # Skip incompatible versions
26+
27+
- name: Set up PHP
4028
uses: shivammathur/setup-php@v2
4129
with:
4230
php-version: ${{ matrix.php }}
43-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
31+
extensions: mbstring, json, xml
4432
coverage: none
4533

46-
- name: Setup problem matchers
47-
run: |
48-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
49-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
34+
- name: Check out code
35+
uses: actions/checkout@v4
5036

5137
- name: Install dependencies
5238
run: |
53-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
39+
composer require --no-update laravel/framework:${{ matrix.laravel }}.*
40+
composer require --no-update orchestra/testbench:${{ matrix.laravel - 2 }}.*
5441
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5542
56-
- name: Execute tests
43+
- name: Run tests with Pest
5744
run: vendor/bin/pest

0 commit comments

Comments
 (0)