Skip to content

Commit 975091a

Browse files
committed
Try variable php versioning
1 parent 386a106 commit 975091a

1 file changed

Lines changed: 36 additions & 74 deletions

File tree

.github/workflows/tests.yml

Lines changed: 36 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ on:
4040
RUN_MSSQL_JOBS:
4141
required: false
4242
type: string
43-
default: '1'
43+
default: '1'
44+
MIN_PHP_VERSION:
45+
required: false
46+
type: string
47+
default: '7.2'
48+
ALL_PHP_VERSIONS:
49+
required: false
50+
type: string
51+
default: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]'
4452
secrets:
4553
CODECOV_TOKEN:
4654
required: false
@@ -62,8 +70,8 @@ jobs:
6270
strategy:
6371
matrix:
6472
include:
65-
- php: '7.2'
66-
db: "none"
73+
- php: ${{ inputs.MIN_PHP_VERSION }}
74+
db: 'none'
6775
NOTESTS: 1
6876

6977
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
@@ -129,44 +137,22 @@ jobs:
129137
if: ${{ inputs.RUN_MYSQL_JOBS == '1' }}
130138
runs-on: ubuntu-22.04
131139
strategy:
132-
matrix:
133-
include:
134-
- php: '7.2'
135-
db: "mariadb:10.1"
136-
- php: '7.2'
137-
db: "mariadb:10.2"
138-
- php: '7.2'
139-
db: "mariadb:10.3"
140-
- php: '7.2'
141-
db: "mariadb:10.4"
142-
- php: '7.2'
143-
db: "mariadb:10.5"
144-
- php: '7.2'
145-
db: "mysql:5.6"
146-
db_alias: "MyISAM Tests"
147-
MYISAM: 1
148-
- php: '7.2'
149-
db: "mysql:5.6"
150-
- php: '7.2'
151-
db: "mysql:5.7"
152-
COVERAGE: ${{ inputs.CODECOV == '1' && '1' || '0' }}
153-
db_alias: ${{ inputs.CODECOV == '1' && 'mysql:5.7 with Coverage' || 'mysql:5.7' }}
154-
- php: '7.3'
155-
db: "mysql:5.7"
156-
- php: '7.4'
157-
db: "mysql:5.7"
158-
- php: '7.4'
159-
db: "mysql:8.0"
160-
- php: '8.0'
161-
db: "mysql:5.7"
162-
- php: '8.1'
163-
db: "mysql:5.7"
164-
- php: '8.2'
165-
db: "mysql:5.7"
166-
- php: '8.3'
167-
db: "mysql:5.7"
168-
- php: '8.4'
169-
db: "mysql:5.7"
140+
matrix:
141+
php: ${{ fromJson(inputs.ALL_PHP_VERSIONS) }}
142+
db: ['mysql:5.7']
143+
include:
144+
- php: ${{ inputs.MIN_PHP_VERSION }}
145+
db: ['mariadb:10.1', 'mariadb:10.2', 'mariadb:10.3', 'mariadb:10.4', 'mariadb:10.5']
146+
- php: ${{ inputs.MIN_PHP_VERSION }}
147+
db: 'mysql:5.6'
148+
- php: ${{ inputs.MIN_PHP_VERSION }}
149+
db: 'mysql:5.6'
150+
db_alias: 'MyISAM Tests'
151+
MYISAM: 1
152+
- php: ${{ inputs.MIN_PHP_VERSION }}
153+
db: 'mysql:8.0'
154+
COVERAGE: ${{ inputs.CODECOV == '1' && '1' || '0' }}
155+
db_alias: ${{ inputs.CODECOV == '1' && 'mysql:8.0 with Coverage' || 'mysql:8.0' }}
170156

171157
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
172158

@@ -274,36 +260,12 @@ jobs:
274260
if: ${{ inputs.RUN_POSTGRESQL_JOBS == '1' }}
275261
runs-on: ubuntu-22.04
276262
strategy:
277-
matrix:
278-
include:
279-
- php: '7.2'
280-
db: "postgres:9.5"
281-
- php: '7.2'
282-
db: "postgres:9.6"
283-
- php: '7.2'
284-
db: "postgres:10"
285-
- php: '7.2'
286-
db: "postgres:11"
287-
- php: '7.2'
288-
db: "postgres:12"
289-
- php: '7.2'
290-
db: "postgres:13"
291-
- php: '7.3'
292-
db: "postgres:13"
293-
- php: '7.4'
294-
db: "postgres:13"
295-
- php: '8.0'
296-
db: "postgres:12"
297-
- php: '8.0'
298-
db: "postgres:13"
299-
- php: '8.1'
300-
db: "postgres:14"
301-
- php: '8.2'
302-
db: "postgres:14"
303-
- php: '8.3'
304-
db: "postgres:14"
305-
- php: '8.4'
306-
db: "postgres:14"
263+
matrix:
264+
php: ${{ fromJson(inputs.ALL_PHP_VERSIONS) }}
265+
db: ['postgres:14']
266+
include:
267+
- php: ${{ inputs.MIN_PHP_VERSION }}
268+
db: ['postgres:9.5', 'postgres:9.6', 'postgres:10', 'postgres:11', 'postgres:12', 'postgres:13']
307269

308270
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
309271

@@ -393,12 +355,12 @@ jobs:
393355
strategy:
394356
matrix:
395357
include:
396-
- php: '7.2'
358+
- php: ${{ inputs.MIN_PHP_VERSION }}
397359
db: "sqlite3"
398-
- php: '7.2'
360+
- php: ${{ inputs.MIN_PHP_VERSION }}
399361
db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
400362
db_alias: 'MSSQL 2019'
401-
- php: '7.2'
363+
- php: ${{ inputs.MIN_PHP_VERSION }}
402364
db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
403365
db_alias: 'MSSQL 2022'
404366

0 commit comments

Comments
 (0)