Skip to content

Commit 8ac737e

Browse files
committed
Add Windows CI/CD
1 parent f9d030e commit 8ac737e

File tree

3 files changed

+109
-2
lines changed

3 files changed

+109
-2
lines changed

.github/workflows/windows_l10.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PHP Composer (Windows; Laravel 10)
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 windows runner has explicit PHP 8.1 support
16+
# see https://github.com/marketplace/actions/setup-php-action
17+
# specify PHP 8.1 to test Laravel 10
18+
runs-on: windows-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.1'
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

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PHP Composer (Windows; Laravel 11)
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 windows runner has explicit PHP 8.2 support
16+
# see https://github.com/marketplace/actions/setup-php-action
17+
# specify PHP 8.2 to test Laravel 10
18+
runs-on: windows-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.2'
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

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ composer run-script test
5656
Latest results of cross-platform testing:
5757
|Runtime|Ubuntu|Windows|
5858
|---|---|---|
59-
|Laravel 10 (PHP 8.1)|[![Build-U-L10-PHP80100][build-u-l10-php80100-image]][build-u-l10-php80100-url]|🛠️|
60-
|Laravel 11 (PHP 8.2)|[![Build-U-L11-PHP80200][build-u-l11-php80200-image]][build-u-l11-php80200-url]|🛠️|
59+
|Laravel 10 (PHP 8.1)|[![Build-U-L10-PHP80100][build-u-l10-php80100-image]][build-u-l10-php80100-url]|[![Build-W-L10-PHP80100][build-w-l10-php80100-image]][build-u-l10-php80100-url]|
60+
|Laravel 11 (PHP 8.2)|[![Build-U-L11-PHP80200][build-u-l11-php80200-image]][build-u-l11-php80200-url]|[![Build-W-L11-PHP80200][build-w-l11-php80200-image]][build-w-l11-php80200-url]|
6161
|Laravel 12 (PHP ???)|🛠️|🛠️|
6262

6363
[packagist-url]: https://packagist.org/packages/vectorial1024/laravel-process-async
@@ -69,6 +69,11 @@ Latest results of cross-platform testing:
6969
[build-u-l11-php80200-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/ubuntu_l10.yml
7070
[build-u-l11-php80200-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/ubuntu_l10.yml?style=plastic
7171

72+
[build-w-l10-php80100-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l10.yml
73+
[build-w-l10-php80100-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l10.yml?style=plastic
74+
[build-w-l11-php80200-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l11.yml
75+
[build-w-l11-php80200-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l11.yml?style=plastic
76+
7277
[packagist-license-image]: https://img.shields.io/packagist/l/vectorial1024/laravel-process-async?style=plastic
7378
[packagist-version-image]: https://img.shields.io/packagist/v/vectorial1024/laravel-process-async?style=plastic
7479
[packagist-downloads-image]: https://img.shields.io/packagist/dm/vectorial1024/laravel-process-async?style=plastic

0 commit comments

Comments
 (0)