Skip to content

Commit 35f0add

Browse files
committed
no issue - add sqlsrv 2022 in test matrix
1 parent 22d450f commit 35f0add

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

dev.sh

+17
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,24 @@ do_test_sqlsrv2019() {
150150
phpunit vendor/bin/phpunit "$@"
151151
}
152152

153+
do_test_sqlsrv2022() {
154+
section_title "Running tests with SQL Server 2022"
155+
docker compose -p query_builder_test exec \
156+
-e DBAL_DRIVER=pdo_sqlsrv \
157+
-e DBAL_DBNAME=test_db \
158+
-e DBAL_HOST=sqlsrv2022 \
159+
-e DBAL_PASSWORD=P@ssword123 \
160+
-e DBAL_PORT=1433 \
161+
-e DBAL_ROOT_PASSWORD=P@ssword123 \
162+
-e DBAL_ROOT_USER=sa \
163+
-e DBAL_USER=sa \
164+
-e DATABASE_URL="pdo-sqlsrv://sa:P%40ssword123@sqlsrv2022:1433/test_db?serverVersion=2022&charset=utf8&driverOptions[TrustServerCertificate]=true" \
165+
phpunit vendor/bin/phpunit "$@"
166+
}
167+
153168
do_test_sqlsrv() {
154169
do_test_sqlsrv2019 "$@"
170+
do_test_sqlsrv2022 "$@"
155171
}
156172

157173
# SQLite version depends upon the PHP embeded version or linked
@@ -176,6 +192,7 @@ do_test_all() {
176192
do_test_postgresql10 "$@"
177193
do_test_postgresql16 "$@"
178194
do_test_sqlsrv2019 "$@"
195+
do_test_sqlsrv2022 "$@"
179196
do_test_sqlite "$@"
180197
}
181198

docker-compose.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ services:
7272
- 9606:1433
7373
networks:
7474
- query-builder-test
75+
sqlsrv2022:
76+
image: mcr.microsoft.com/mssql/server:2022-latest
77+
restart: 'no'
78+
environment:
79+
ACCEPT_EULA: "y"
80+
MSSQL_PID: Developer
81+
MSSQL_SA_PASSWORD: P@ssword123
82+
SA_PASSWORD: P@ssword123
83+
ports:
84+
- 9607:1433
85+
networks:
86+
- query-builder-test
7587

7688
networks:
7789
query-builder-test:

0 commit comments

Comments
 (0)