Skip to content

Commit 7cacd8b

Browse files
committed
Action with PHP matrix
1 parent 0b077a5 commit 7cacd8b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ jobs:
1313

1414
runs-on: ubuntu-latest
1515

16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php-versions: ["7.4", "8.3", "8.4", "8.5"]
20+
phpunit-versions: ["latest"]
21+
1622
steps:
1723
- uses: actions/checkout@v4
1824

1925
- name: Validate composer.json and composer.lock
2026
uses: php-actions/composer@v6
2127
with:
28+
php_version: ${{ matrix.php-versions }}
2229
command: validate --strict
2330

2431
- name: Cache Composer packages
@@ -33,6 +40,7 @@ jobs:
3340
- name: Install dependencies
3441
uses: php-actions/composer@v6
3542
with:
43+
php_version: ${{ matrix.php-versions }}
3644
args: --prefer-dist --no-progress
3745

3846
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
@@ -41,4 +49,5 @@ jobs:
4149
- name: Run test suite
4250
uses: php-actions/phpunit@v4
4351
with:
52+
php_version: ${{ matrix.php-versions }}
4453
php_extensions: gd

0 commit comments

Comments
 (0)