Skip to content

Commit 0af5613

Browse files
committed
chore: update GitHub Actions workflow to support additional Laravel versions and improve matrix configuration
1 parent ea2a76c commit 0af5613

File tree

1 file changed

+43
-40
lines changed

1 file changed

+43
-40
lines changed

.github/workflows/run-tests.yml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
name: run-tests
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
jobs:
10-
test:
11-
runs-on: ubuntu-latest
12-
13-
strategy:
14-
fail-fast: true
15-
matrix:
16-
php: [ 8.4,8.3,8.2 ]
17-
laravel: [ "^12.0", "^11.0" ]
18-
19-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup PHP
26-
uses: shivammathur/setup-php@v2
27-
with:
28-
php-version: ${{ matrix.php }}
29-
ini-values: error_reporting=E_ALL
30-
tools: composer:v2
31-
coverage: none
32-
33-
- name: Setup problem matchers
34-
run: |
35-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
36-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
37-
38-
- name: Install dependencies
39-
run: |
40-
composer require "laravel/framework:${{ matrix.laravel }}" --no-update
41-
composer update --prefer-dist --no-interaction --no-progress
42-
43-
- name: Execute tests
44-
timeout-minutes: 2
45-
run: vendor/bin/pest
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ubuntu-latest]
16+
php: [ 8.4, 8.3, 8.2 ]
17+
laravel: ["^12.0", "^11.0", "^10.0"]
18+
stability: [prefer-stable]
19+
exclude:
20+
- php: 8.1
21+
laravel: "^12.0"
22+
- php: 8.1
23+
laravel: "^11.0"
24+
25+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
coverage: none
36+
37+
- name: Setup problem matchers
38+
run: |
39+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
40+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
41+
42+
- name: Install dependencies
43+
run: |
44+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
45+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46+
47+
- name: Execute tests
48+
run: vendor/bin/pest

0 commit comments

Comments
 (0)