Skip to content

Commit 44bb131

Browse files
committed
Refactor CI workflow to use matrix strategy for PHP versions and OS; update dependency installation logic and streamline test execution
1 parent c6c9626 commit 44bb131

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ permissions:
1313

1414
jobs:
1515
test:
16-
name: PHP 8.2 Debug (ubuntu-latest)
17-
runs-on: ubuntu-latest
16+
name: PHP ${{ matrix.php }} (${{ matrix.os }})
17+
runs-on: ${{ matrix.os }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, windows-latest, macos-latest]
23+
php: ['8.2', '8.3', '8.4', '8.5']
1824

1925
steps:
2026
- name: Checkout Code
@@ -23,17 +29,18 @@ jobs:
2329
- name: Setup PHP
2430
uses: shivammathur/setup-php@v2
2531
with:
26-
php-version: '8.2'
32+
php-version: ${{ matrix.php }}
2733
extensions: dom, mbstring, zip, libxml, json, tokenizer, fileinfo
2834
coverage: none
2935

3036
- name: Install Dependencies
3137
uses: ramsey/composer-install@v3
3238
with:
33-
dependency-versions: lowest
39+
dependency-versions: ${{ matrix.php == '8.2' && 'lowest' || 'highest' }}
3440

35-
- name: Clear TypePHP Cache
36-
run: php bin/typephp cache:clear
41+
- name: Run Static Analysis (PHPStan)
42+
run: ./vendor/bin/phpstan analyse --no-progress
43+
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.3'
3744

38-
- name: Run Test Suite (Pest) with Live Debug
39-
run: ./vendor/bin/pest tests/TypeChecking/ArraysAndShapes/ClassConstKeyShapeTest.php
45+
- name: Run Test Suite (Pest)
46+
run: ./vendor/bin/pest --ci

0 commit comments

Comments
 (0)