Skip to content

Commit 6a39e17

Browse files
committed
update github action to include PHP8.6
1 parent f6f3fd5 commit 6a39e17

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212
matrix:
1313
php: ['8.2', '8.3', '8.4', '8.5']
1414
stability: [prefer-lowest, prefer-stable]
15+
include:
16+
- php: '8.6'
17+
stability: prefer-stable
18+
flags: "--ignore-platform-req=php"
19+
fail-fast: false
20+
1521
steps:
1622
- name: Checkout code
1723
uses: actions/checkout@v4
@@ -22,6 +28,7 @@ jobs:
2228
php-version: ${{ matrix.php }}
2329
coverage: xdebug
2430
tools: composer:v2
31+
2532
- name: Check PHP Version
2633
run: php -v
2734

@@ -40,11 +47,30 @@ jobs:
4047
${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-
4148
${{ runner.os }}-composer-
4249
43-
- name: Install dependencies
44-
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
50+
# INSTALL logic
51+
# 1. STABLE php + STABLE deps → composer install (NO updates)
52+
- name: Install dependencies (install)
53+
if: ${{ matrix.stability == 'prefer-stable' && matrix.php != '8.6' }}
54+
run: composer install --prefer-dist --no-interaction --no-progress
55+
56+
# 2. prefer-lowest → must use composer update
57+
- name: Install dependencies (prefer-lowest)
58+
if: ${{ matrix.stability == 'prefer-lowest' }}
59+
run: composer update --prefer-lowest --prefer-dist --no-interaction --no-progress
60+
61+
# 3. PHP 8.6 dev → always update
62+
- name: Install dependencies (nightly)
63+
if: ${{ matrix.php == '8.6' }}
64+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
4565

4666
- name: Run Unit tests with coverage
47-
run: composer phpunit -- ${{ matrix.phpunit-flags }}
67+
if: ${{ matrix.php != '8.6' }}
68+
run: composer phpunit
69+
70+
- name: Run Unit tests without coverage (nightly)
71+
if: ${{ matrix.php == '8.6' }}
72+
run: composer phpunit
73+
continue-on-error: true
4874

4975
- name: Run static analysis
5076
run: composer phpstan

0 commit comments

Comments
 (0)