Skip to content

Commit adb0a6d

Browse files
committed
Update GitHub Actions for Laravel 11
1 parent 58b76e1 commit adb0a6d

File tree

1 file changed

+56
-42
lines changed

1 file changed

+56
-42
lines changed

.github/workflows/main.yml

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,61 @@
11
name: run-tests
22

33
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
810

911
jobs:
10-
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: true
14-
matrix:
15-
os: [ubuntu-latest, windows-latest]
16-
php: [7.4, 8.0, 8.1]
17-
laravel: [8.*, 10.*]
18-
stability: [prefer-lowest, prefer-stable]
19-
include:
20-
- laravel: 10.*
21-
testbench: ^8.0
22-
- laravel: 8.*
23-
testbench: ^6.6
24-
25-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
26-
27-
steps:
28-
- name: Checkout code
29-
uses: actions/checkout@v2
30-
31-
- name: Setup PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: ${{ matrix.php }}
35-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
36-
coverage: none
37-
38-
- name: Setup problem matchers
39-
run: |
40-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
41-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
42-
- name: Install dependencies
43-
run: |
44-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
45-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46-
- name: Execute tests
47-
run: vendor/bin/phpunit
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
php: [7.4, 8.0, 8.1, '8.2']
20+
laravel: ['8.*', '10.*', '11.*']
21+
stability: [prefer-lowest, prefer-stable]
22+
include:
23+
- laravel: 10.*
24+
testbench: ^8.0
25+
- laravel: 8.*
26+
testbench: ^6.6
27+
- laravel: 11.*
28+
testbench: ^9.0
29+
exclude:
30+
- laravel: 11.*
31+
php: 7.4
32+
- laravel: 11.*
33+
php: 8.0
34+
- laravel: 11.*
35+
php: 8.1
36+
37+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v2
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: ${{ matrix.php }}
47+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
48+
coverage: none
49+
50+
- name: Setup problem matchers
51+
run: |
52+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
53+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
54+
55+
- name: Install dependencies
56+
run: |
57+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
59+
60+
- name: Execute tests
61+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)