Skip to content

Commit e9d706a

Browse files
committed
Add a workflow file for testing on multiple platforms
1 parent 6d593f9 commit e9d706a

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test on multiple platforms
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches: [ 'master', 'main' ]
9+
workflow_dispatch:
10+
schedule:
11+
- cron: '0 9 15 * *'
12+
13+
jobs:
14+
test:
15+
name: Test on multiple platforms
16+
runs-on: ${{ matrix.os }}
17+
env:
18+
PHP_EXTENSIONS: mbstring, json, bcmath, zip, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, exif, gd, ldap, fileinfo
19+
strategy:
20+
matrix:
21+
# https://github.com/shivammathur/setup-php?tab=readme-ov-file#cloud-osplatform-support
22+
os: [ 'ubuntu-24.04', 'windows-2022', 'macos-13' ]
23+
php: [ '8.3' ]
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install PHP with extensions
29+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
30+
with:
31+
php-version: ${{ matrix.php-version }}
32+
coverage: pcov
33+
extensions: ${{ env.PHP_EXTENSIONS }}
34+
35+
- name: Prepare environment
36+
run: composer install
37+
38+
- name: Run testing
39+
run: composer test

.github/workflows/php.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: Test
22

33
on:
44
push:
5+
branches:
6+
- "*"
57
pull_request:
8+
branches: [ 'master', 'main' ]
69
workflow_dispatch:
710
schedule:
811
- cron: '0 9 15 * *'

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: run-phpstan
1+
name: PHPStan
22

33
on:
44
push:

0 commit comments

Comments
 (0)