Skip to content

Commit a2d200e

Browse files
committed
Add PHP 8.3/8.4/8.5 to the test matrix in CI.
1 parent 3dd7680 commit a2d200e

1 file changed

Lines changed: 178 additions & 127 deletions

File tree

.github/workflows/test-phpunit.yml

Lines changed: 178 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,191 @@
11
name: PHPUnit
22

3-
on: [push, pull_request]
3+
on: [ push, pull_request ]
44

55
permissions:
6-
contents: read
6+
contents: read
77

88
jobs:
9-
tests:
10-
runs-on: ubuntu-22.04
11-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
12-
env:
13-
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
9+
tests:
10+
runs-on: ubuntu-22.04
11+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
12+
env:
13+
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
1414

15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
php: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4']
19-
DB: [ 'pdo/mysql', 'pdo/pgsql', 'pdo/sqlite', 'mysqli', 'pgsql', 'sqlite' ]
20-
compiler: [ default ]
21-
include:
22-
- php: '8.2'
23-
DB: 'pdo/mysql'
24-
compiler: jit
25-
- php: '8.2'
26-
DB: 'pdo/pgsql'
27-
compiler: jit
28-
- php: '8.2'
29-
DB: 'pdo/sqlite'
30-
compiler: jit
31-
- php: '8.2'
32-
DB: 'mysqli'
33-
compiler: jit
34-
- php: '8.2'
35-
DB: 'pgsql'
36-
compiler: jit
37-
- php: '8.2'
38-
DB: 'sqlite'
39-
compiler: jit
40-
- php: '8.1'
41-
DB: 'pdo/mysql'
42-
compiler: jit
43-
- php: '8.1'
44-
DB: 'pdo/pgsql'
45-
compiler: jit
46-
- php: '8.1'
47-
DB: 'pdo/sqlite'
48-
compiler: jit
49-
- php: '8.1'
50-
DB: 'mysqli'
51-
compiler: jit
52-
- php: '8.1'
53-
DB: 'pgsql'
54-
compiler: jit
55-
- php: '8.1'
56-
DB: 'sqlite'
57-
compiler: jit
58-
- php: '8.0'
59-
DB: 'pdo/mysql'
60-
compiler: jit
61-
- php: '8.0'
62-
DB: 'pdo/pgsql'
63-
compiler: jit
64-
- php: '8.0'
65-
DB: 'pdo/sqlite'
66-
compiler: jit
67-
- php: '8.0'
68-
DB: 'mysqli'
69-
compiler: jit
70-
- php: '8.0'
71-
DB: 'pgsql'
72-
compiler: jit
73-
- php: '8.0'
74-
DB: 'sqlite'
75-
compiler: jit
76-
- php: '5.6'
77-
DB: 'mysql'
78-
compiler: default
79-
- php: '5.5'
80-
DB: 'mysql'
81-
compiler: default
82-
- php: '5.4'
83-
DB: 'mysql'
84-
compiler: default
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php: [ '8.5', 8.4', '8.3', '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4' ]
19+
DB: [ 'pdo/mysql', 'pdo/pgsql', 'pdo/sqlite', 'mysqli', 'pgsql', 'sqlite' ]
20+
compiler: [ default ]
21+
include:
22+
- php: '8.5'
23+
DB: 'pdo/mysql'
24+
compiler: jit
25+
- php: '8.5'
26+
DB: 'pdo/pgsql'
27+
compiler: jit
28+
- php: '8.5'
29+
DB: 'pdo/sqlite'
30+
compiler: jit
31+
- php: '8.5'
32+
DB: 'mysqli'
33+
compiler: jit
34+
- php: '8.5'
35+
DB: 'pgsql'
36+
compiler: jit
37+
- php: '8.5'
38+
DB: 'sqlite'
39+
- php: '8.4'
40+
DB: 'pdo/mysql'
41+
compiler: jit
42+
- php: '8.4'
43+
DB: 'pdo/pgsql'
44+
compiler: jit
45+
- php: '8.4'
46+
DB: 'pdo/sqlite'
47+
compiler: jit
48+
- php: '8.4'
49+
DB: 'mysqli'
50+
compiler: jit
51+
- php: '8.4'
52+
DB: 'pgsql'
53+
compiler: jit
54+
- php: '8.4'
55+
DB: 'sqlite'
56+
- php: '8.3'
57+
DB: 'pdo/mysql'
58+
compiler: jit
59+
- php: '8.3'
60+
DB: 'pdo/pgsql'
61+
compiler: jit
62+
- php: '8.3'
63+
DB: 'pdo/sqlite'
64+
compiler: jit
65+
- php: '8.3'
66+
DB: 'mysqli'
67+
compiler: jit
68+
- php: '8.3'
69+
DB: 'pgsql'
70+
compiler: jit
71+
- php: '8.3'
72+
DB: 'sqlite'
73+
- php: '8.2'
74+
DB: 'pdo/mysql'
75+
compiler: jit
76+
- php: '8.2'
77+
DB: 'pdo/pgsql'
78+
compiler: jit
79+
- php: '8.2'
80+
DB: 'pdo/sqlite'
81+
compiler: jit
82+
- php: '8.2'
83+
DB: 'mysqli'
84+
compiler: jit
85+
- php: '8.2'
86+
DB: 'pgsql'
87+
compiler: jit
88+
- php: '8.2'
89+
DB: 'sqlite'
90+
compiler: jit
91+
- php: '8.1'
92+
DB: 'pdo/mysql'
93+
compiler: jit
94+
- php: '8.1'
95+
DB: 'pdo/pgsql'
96+
compiler: jit
97+
- php: '8.1'
98+
DB: 'pdo/sqlite'
99+
compiler: jit
100+
- php: '8.1'
101+
DB: 'mysqli'
102+
compiler: jit
103+
- php: '8.1'
104+
DB: 'pgsql'
105+
compiler: jit
106+
- php: '8.1'
107+
DB: 'sqlite'
108+
compiler: jit
109+
- php: '8.0'
110+
DB: 'pdo/mysql'
111+
compiler: jit
112+
- php: '8.0'
113+
DB: 'pdo/pgsql'
114+
compiler: jit
115+
- php: '8.0'
116+
DB: 'pdo/sqlite'
117+
compiler: jit
118+
- php: '8.0'
119+
DB: 'mysqli'
120+
compiler: jit
121+
- php: '8.0'
122+
DB: 'pgsql'
123+
compiler: jit
124+
- php: '8.0'
125+
DB: 'sqlite'
126+
compiler: jit
127+
- php: '5.6'
128+
DB: 'mysql'
129+
compiler: default
130+
- php: '5.5'
131+
DB: 'mysql'
132+
compiler: default
133+
- php: '5.4'
134+
DB: 'mysql'
135+
compiler: default
85136

86-
services:
87-
postgres:
88-
image: postgres:12
89-
env:
90-
POSTGRES_USER: postgres
91-
POSTGRES_PASSWORD: postgres
92-
POSTGRES_DB: ci_test
93-
ports:
94-
- 5432:5432
95-
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
137+
services:
138+
postgres:
139+
image: postgres:12
140+
env:
141+
POSTGRES_USER: postgres
142+
POSTGRES_PASSWORD: postgres
143+
POSTGRES_DB: ci_test
144+
ports:
145+
- 5432:5432
146+
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
96147

97-
mysql:
98-
image: mysql:5.7
99-
env:
100-
MYSQL_ALLOW_EMPTY_PASSWORD: true
101-
MYSQL_USER: travis
102-
MYSQL_PASSWORD: travis
103-
MYSQL_DATABASE: ci_test
104-
ports:
105-
- 3306:3306
106-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
148+
mysql:
149+
image: mysql:5.7
150+
env:
151+
MYSQL_ALLOW_EMPTY_PASSWORD: true
152+
MYSQL_USER: travis
153+
MYSQL_PASSWORD: travis
154+
MYSQL_DATABASE: ci_test
155+
ports:
156+
- 3306:3306
157+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
107158

108-
steps:
109-
- name: Checkout
110-
uses: actions/checkout@v2
111-
- name: Override PHP ini values for JIT compiler
112-
if: matrix.compiler == 'jit'
113-
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=64M" >> $GITHUB_ENV
159+
steps:
160+
- name: Checkout
161+
uses: actions/checkout@v4
162+
- name: Override PHP ini values for JIT compiler
163+
if: matrix.compiler == 'jit'
164+
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=64M" >> $GITHUB_ENV
114165

115-
- name: Install PHP${{ matrix.php }} - DB ${{ matrix.DB }}
116-
uses: shivammathur/setup-php@v2
117-
with:
118-
php-version: ${{ matrix.php }}
119-
tools: composer, pecl
120-
extensions: imagick, sqlite3, pgsql, mysqli, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, mbstring
121-
ini-values: ${{ env.PHP_INI_VALUES }}
122-
coverage: xdebug
166+
- name: Install PHP${{ matrix.php }} - DB ${{ matrix.DB }}
167+
uses: shivammathur/setup-php@v2
168+
with:
169+
php-version: ${{ matrix.php }}
170+
tools: composer, pecl
171+
extensions: imagick, sqlite3, pgsql, mysqli, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, mbstring
172+
ini-values: ${{ env.PHP_INI_VALUES }}
173+
coverage: xdebug
123174

124-
- name: Get composer cache directory
125-
id: composer-cache
126-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
127-
- name: Cache composer dependencies
128-
uses: actions/cache@v2
129-
with:
130-
path: ${{ steps.composer-cache.outputs.dir }}
131-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
132-
restore-keys: ${{ runner.os }}-composer-
133-
- name: Install composer dependencies
134-
run: composer install --no-progress --prefer-dist --optimize-autoloader
175+
- name: Get composer cache directory
176+
id: composer-cache
177+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
178+
- name: Cache composer dependencies
179+
uses: actions/cache@v4
180+
with:
181+
path: ${{ steps.composer-cache.outputs.dir }}
182+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
183+
restore-keys: ${{ runner.os }}-composer-
184+
- name: Install composer dependencies
185+
run: composer install --no-progress --prefer-dist --optimize-autoloader
135186

136-
- name: PHPUnit Test
137-
run: |
138-
php -d error_reporting=E_ALL -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/${{ matrix.DB }}.phpunit.xml
139-
env:
140-
XDEBUG_MODE: coverage
187+
- name: PHPUnit Test
188+
run: |
189+
php -d error_reporting=E_ALL -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/${{ matrix.DB }}.phpunit.xml
190+
env:
191+
XDEBUG_MODE: coverage

0 commit comments

Comments
 (0)