Skip to content

Commit 34d2396

Browse files
Update PHP and MSSQL versions in CI workflow. (#20240)
1 parent 9fc8a2d commit 34d2396

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/ci-mssql.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010

1111
jobs:
1212
tests:
13-
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
13+
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql.version }}
1414

1515
env:
1616
EXTENSIONS: pdo, pdo_sqlsrv
@@ -21,37 +21,45 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24+
php:
25+
- 7.4
26+
- 8.0
27+
- 8.1
28+
- 8.2
29+
- 8.3
30+
- 8.4
31+
32+
mssql:
33+
- version: server:2022-latest
34+
mssql-tool: /opt/mssql-tools18/bin/sqlcmd -C
35+
2436
include:
2537
- php: 7.4
26-
mssql: server:2017-latest
38+
mssql:
39+
version: server:2017-latest
40+
mssql-tool: /opt/mssql-tools/bin/sqlcmd
2741
- php: 8.0
28-
mssql: server:2019-latest
29-
- php: 8.1
30-
mssql: server:2019-latest
31-
- php: 8.2
32-
mssql: server:2022-latest
33-
- php: 8.3
34-
mssql: server:2022-latest
35-
- php: 8.4
36-
mssql: server:2022-latest
42+
mssql:
43+
version: server:2019-latest
44+
mssql-tool: /opt/mssql-tools18/bin/sqlcmd -C
3745

3846
services:
3947
mssql:
40-
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
48+
image: mcr.microsoft.com/mssql/${{ matrix.mssql.version }}
4149
env:
4250
SA_PASSWORD: YourStrong!Passw0rd
4351
ACCEPT_EULA: Y
4452
MSSQL_PID: Developer
4553
ports:
4654
- 1433:1433
47-
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
55+
options: --name=mssql --health-cmd="${{ matrix.mssql.mssql-tool }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
4856

4957
steps:
5058
- name: Checkout
5159
uses: actions/checkout@v4
5260

5361
- name: Create MS SQL Database
54-
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
62+
run: docker exec -i mssql ${{ matrix.mssql.mssql-tool }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
5563

5664
- name: Install PHP with extensions
5765
uses: shivammathur/setup-php@v2

0 commit comments

Comments
 (0)