Skip to content

Commit af721c9

Browse files
KentarouTakedacmb69
authored andcommitted
Fix MySQL and MSSQL CI failures
* use mysql service container for nightly tests * remove unnecessary mysql startup * update mssql container to newer version Closes GH-16011.
1 parent acee803 commit af721c9

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

.github/actions/setup-mssql/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ runs:
1111
-p 1433:1433 \
1212
--name sql1 \
1313
-h sql1 \
14-
-d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04
14+
-d mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04

.github/actions/setup-x64/action.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ runs:
66
run: |
77
set -x
88
9-
sudo service mysql start
109
sudo service slapd start
11-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
12-
# Ensure local_infile tests can run.
13-
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
14-
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
15-
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login odbc_test with password='password', check_policy=off; create user odbc_test for login odbc_test; grant alter, control, delete to odbc_test;"
16-
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "ALTER SERVER ROLE sysadmin ADD MEMBER odbc_test;"
17-
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE odbc;"
18-
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE pdo_odbc;"
10+
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
11+
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "create login odbc_test with password='password', check_policy=off; create user odbc_test for login odbc_test; grant alter, control, delete to odbc_test;"
12+
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "ALTER SERVER ROLE sysadmin ADD MEMBER odbc_test;"
13+
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE odbc;"
14+
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE pdo_odbc;"
1915
sudo locale-gen de_DE
2016
2117
./.github/scripts/setup-slapd.sh

.github/workflows/nightly.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ jobs:
4242
needs: GENERATE_MATRIX
4343
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
4444
services:
45+
mysql:
46+
image: mysql:8.3
47+
ports:
48+
- 3306:3306
49+
env:
50+
MYSQL_DATABASE: test
51+
MYSQL_ROOT_PASSWORD: root
4552
postgres:
4653
image: postgres
4754
env:
@@ -286,6 +293,13 @@ jobs:
286293
COVERAGE_DEBUG_NTS:
287294
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
288295
services:
296+
mysql:
297+
image: mysql:8.3
298+
ports:
299+
- 3306:3306
300+
env:
301+
MYSQL_DATABASE: test
302+
MYSQL_ROOT_PASSWORD: root
289303
postgres:
290304
image: postgres
291305
env:
@@ -501,6 +515,13 @@ jobs:
501515
needs: GENERATE_MATRIX
502516
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
503517
services:
518+
mysql:
519+
image: mysql:8.3
520+
ports:
521+
- 3306:3306
522+
env:
523+
MYSQL_DATABASE: test
524+
MYSQL_ROOT_PASSWORD: root
504525
postgres:
505526
image: postgres
506527
env:

0 commit comments

Comments
 (0)