Skip to content

Commit b28f7a3

Browse files
committed
Test framework for PHP 8.1
1 parent ab580ba commit b28f7a3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
php-versions: ['7.3', '7.4', '8.0']
43+
php-versions: ['7.3', '7.4', '8.0', '8.1']
4444
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']
4545
mysql-versions: ['5.7']
4646
include:
4747
- php-versions: '7.4'
4848
db-platforms: MySQLi
4949
mysql-versions: '8.0'
50+
# @todo remove once 8.1 is stable enough
51+
- php-versions: '8.1'
52+
composer-flag: '--ignore-platform-req=php'
5053

5154
services:
5255
mysql:
@@ -122,14 +125,14 @@ jobs:
122125

123126
- name: Install dependencies
124127
run: |
125-
composer update --ansi --no-interaction
126-
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config
128+
composer update --ansi --no-interaction ${{ matrix.composer-flag }}
129+
composer remove --ansi --dev --unused -W ${{ matrix.composer-flag }} -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config
127130
php -r 'file_put_contents("vendor/laminas/laminas-zendframework-bridge/src/autoload.php", "");'
128131
env:
129132
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
130133

131-
- name: Profile slow tests in PHP 7.4 MySQLi for now
132-
if: matrix.php-versions == '7.4' && matrix.db-platforms == 'MySQLi'
134+
- name: Profile slow tests in PHP 8.0
135+
if: matrix.php-versions == '8.0'
133136
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
134137

135138
- name: Test with PHPUnit
@@ -138,7 +141,7 @@ jobs:
138141
DB: ${{ matrix.db-platforms }}
139142
TERM: xterm-256color
140143

141-
- if: github.repository_owner == 'codeigniter4' && matrix.php-versions == '7.4'
144+
- if: github.repository_owner == 'codeigniter4' && matrix.php-versions == '8.0'
142145
name: Run Coveralls
143146
run: |
144147
composer global require --ansi php-coveralls/php-coveralls:^2.4

0 commit comments

Comments
 (0)