Skip to content

Commit 17818b8

Browse files
committed
Add PHP 8.2 to Unit Tests GHA
1 parent ce951b1 commit 17818b8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
php-versions: ['7.4', '8.0', '8.1']
39+
php-versions: ['7.4', '8.0', '8.1', '8.2']
4040
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8']
4141
mysql-versions: ['5.7']
4242
include:
@@ -151,10 +151,18 @@ jobs:
151151
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
152152
restore-keys: ${{ runner.os }}-composer-
153153

154+
# remove when PHP 8.2 is generally available
155+
- name: Ignore option for PHP version
156+
uses: actions/github-script@v6
157+
id: composer-ignore-php-option
158+
with:
159+
script: 'return "${{ matrix.php-versions }}" == "8.2" ? "--ignore-platform-req=php" : ""'
160+
result-encoding: string
161+
154162
- name: Install dependencies
155163
run: |
156-
composer update --ansi --no-interaction
157-
composer remove --ansi --dev --unused -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
164+
composer update --ansi --no-interaction ${{ steps.composer-ignore-php-option.outputs.result }}
165+
composer remove --ansi --dev --unused ${{ steps.composer-ignore-php-option.outputs.result }} -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
158166
env:
159167
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
160168

@@ -170,6 +178,7 @@ jobs:
170178
result-encoding: string
171179

172180
- name: Test with PHPUnit
181+
continue-on-error: ${{ matrix.php-versions == '8.2' }} # remove when PHP 8.2 is generally available
173182
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review ${{ steps.phpunit-coverage-option.outputs.result }}"
174183
env:
175184
DB: ${{ matrix.db-platforms }}

0 commit comments

Comments
 (0)