Skip to content

Commit

Permalink
Add Windows CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorial1024 committed Dec 1, 2024
1 parent f9d030e commit 8ac737e
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/windows_l10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: PHP Composer (Windows; Laravel 10)

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

# no windows runner has explicit PHP 8.1 support
# see https://github.com/marketplace/actions/setup-php-action
# specify PHP 8.1 to test Laravel 10
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# dump autoload to "boot" our custom mock artisan
- name: Dump auto-load details
run: composer dump-autoload

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
51 changes: 51 additions & 0 deletions .github/workflows/windows_l11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: PHP Composer (Windows; Laravel 11)

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

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

steps:
- uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# dump autoload to "boot" our custom mock artisan
- name: Dump auto-load details
run: composer dump-autoload

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ composer run-script test
Latest results of cross-platform testing:
|Runtime|Ubuntu|Windows|
|---|---|---|
|Laravel 10 (PHP 8.1)|[![Build-U-L10-PHP80100][build-u-l10-php80100-image]][build-u-l10-php80100-url]|🛠️|
|Laravel 11 (PHP 8.2)|[![Build-U-L11-PHP80200][build-u-l11-php80200-image]][build-u-l11-php80200-url]|🛠️|
|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]|
|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]|
|Laravel 12 (PHP ???)|🛠️|🛠️|

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

[build-w-l10-php80100-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l10.yml
[build-w-l10-php80100-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l10.yml?style=plastic
[build-w-l11-php80200-url]: https://github.com/Vectorial1024/laravel-process-async/actions/workflows/windows_l11.yml
[build-w-l11-php80200-image]: https://img.shields.io/github/actions/workflow/status/Vectorial1024/laravel-process-async/windows_l11.yml?style=plastic

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

0 comments on commit 8ac737e

Please sign in to comment.