Skip to content

Commit 9df1265

Browse files
committed
Add in the Laravel 12 tests
1 parent a05d647 commit 9df1265

File tree

5 files changed

+167
-2
lines changed

5 files changed

+167
-2
lines changed

.github/workflows/macos_l12.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: PHP Composer (MacOS; Laravel 12)
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
# no macos runner has explicit PHP 8.3 support
16+
# see https://github.com/marketplace/actions/setup-php-action
17+
# specify PHP 8.3 to test Laravel 12
18+
runs-on: macos-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup PHP with PECL extension
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: '8.3'
27+
28+
- name: "Homebrew: Install GNU Core Utilities"
29+
run: yes | brew install coreutils
30+
31+
- name: Validate composer.json and composer.lock
32+
run: composer validate --strict
33+
34+
- name: Cache Composer packages
35+
id: composer-cache
36+
uses: actions/cache@v3
37+
with:
38+
path: vendor
39+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-php-
42+
43+
- name: Install dependencies
44+
run: composer install --prefer-dist --no-progress
45+
46+
# dump autoload to "boot" our custom mock artisan
47+
- name: Dump auto-load details
48+
run: composer dump-autoload
49+
50+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
51+
# Docs: https://getcomposer.org/doc/articles/scripts.md
52+
53+
- name: Run test suite
54+
run: composer run-script test

.github/workflows/ubuntu_l12.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PHP Composer (Ubuntu; Laravel 12)
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
# right now, ubuntu-latest has explicit PHP 8.3 support
16+
# see https://github.com/marketplace/actions/setup-php-action
17+
# specify PHP 8.3 to test Laravel 12
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
# - name: Setup PHP with PECL extension
24+
# uses: shivammathur/setup-php@v2
25+
# with:
26+
# php-version: '8.3'
27+
28+
- name: Validate composer.json and composer.lock
29+
run: composer validate --strict
30+
31+
- name: Cache Composer packages
32+
id: composer-cache
33+
uses: actions/cache@v3
34+
with:
35+
path: vendor
36+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-php-
39+
40+
- name: Install dependencies
41+
run: composer install --prefer-dist --no-progress
42+
43+
# dump autoload to "boot" our custom mock artisan
44+
- name: Dump auto-load details
45+
run: composer dump-autoload
46+
47+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
48+
# Docs: https://getcomposer.org/doc/articles/scripts.md
49+
50+
- name: Run test suite
51+
run: composer run-script test

.github/workflows/windows_l11.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
# no windows runner has explicit PHP 8.2 support
1616
# see https://github.com/marketplace/actions/setup-php-action
17-
# specify PHP 8.2 to test Laravel 10
17+
# specify PHP 8.2 to test Laravel 11
1818
runs-on: windows-latest
1919

2020
steps:

.github/workflows/windows_l12.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PHP Composer (Windows; Laravel 12)
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
# all windows runners have explicit PHP 8.3 support
16+
# but we need some extra extensions, so we still need the setup action
17+
# see https://github.com/marketplace/actions/setup-php-action
18+
# specify PHP 8.3 to test Laravel 12
19+
runs-on: windows-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup PHP with PECL extension
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: '8.3'
28+
extensions: fileinfo
29+
30+
- name: Validate composer.json and composer.lock
31+
run: composer validate --strict
32+
33+
- name: Cache Composer packages
34+
id: composer-cache
35+
uses: actions/cache@v3
36+
with:
37+
path: vendor
38+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-php-
41+
42+
- name: Install dependencies
43+
run: composer install --prefer-dist --no-progress
44+
45+
# dump autoload to "boot" our custom mock artisan
46+
- name: Dump auto-load details
47+
run: composer dump-autoload
48+
49+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
50+
# Docs: https://getcomposer.org/doc/articles/scripts.md
51+
52+
- name: Run test suite
53+
run: composer run-script test

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ Latest cross-platform testing results:
131131
|---|---|---|---|
132132
|Laravel 10 (PHP 8.1)|skipped*|skipped*|skipped*|
133133
|Laravel 11 (PHP 8.2)|[![Build-M-L11][build-m-l11-image]][build-m-l11-url]|[![Build-U-L11][build-u-l11-image]][build-u-l11-url]|[![Build-W-L11][build-w-l11-image]][build-w-l11-url]|
134-
|Laravel 12 (PHP ???)|🛠️|🛠️|🛠️|
134+
|Laravel 12 (PHP 8.3)|[![Build-M-L12][build-m-l12-image]][build-m-l12-url]|[![Build-U-L12][build-u-l12-image]][build-u-l12-url]|[![Build-W-L12][build-w-l12-image]][build-w-l12-url]|
135+
|Laravel 13 (PHP ???)|🛠️|🛠️|🛠️|
135136

136137
\*Note: tests for these Laravel versions are skipped because they have old `artisan` file contents:
137138
- It is difficult to mock multi-version `artisan` files for different Laravel versions (see https://github.com/Vectorial1024/laravel-process-async/issues/6).
@@ -144,12 +145,18 @@ Latest cross-platform testing results:
144145

145146
[build-m-l11-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/macos_l11.yml
146147
[build-m-l11-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/macos_l11.yml?style=plastic
148+
[build-m-l12-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/macos_l12.yml
149+
[build-m-l12-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/macos_l12.yml?style=plastic
147150

148151
[build-u-l11-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/ubuntu_l11.yml
149152
[build-u-l11-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/ubuntu_l11.yml?style=plastic
153+
[build-u-l12-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/ubuntu_l12.yml
154+
[build-u-l12-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/ubuntu_l12.yml?style=plastic
150155

151156
[build-w-l11-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l11.yml
152157
[build-w-l11-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l11.yml?style=plastic
158+
[build-w-l12-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l12.yml
159+
[build-w-l12-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l12.yml?style=plastic
153160

154161
[packagist-license-image]: https://img.shields.io/packagist/l/vectorial1024/laravel-process-async?style=plastic
155162
[packagist-version-image]: https://img.shields.io/packagist/v/vectorial1024/laravel-process-async?style=plastic

0 commit comments

Comments
 (0)