Skip to content

Commit 28154b7

Browse files
committed
fix: resolve SQL Server container initialization issues in GitHub Actions
- Added MSSQL_PID='Developer' to specify SQL Server edition - Added MSSQL_MEMORY_LIMIT_MB='2048' to set explicit memory limit - Updated sqlcmd path to /opt/mssql-tools18/bin/sqlcmd for SQL Server 2022 - Added -No flag to sqlcmd to disable certificate validation - Increased health check intervals and added 30s start period - Added wait step to ensure SQL Server is ready before running tests - Used netcat to check port availability instead of docker exec
1 parent bc4ac4f commit 28154b7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/testing-mssql.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ jobs:
4343
env:
4444
ACCEPT_EULA: 'Y'
4545
SA_PASSWORD: 'SSpaSS__1_123'
46+
MSSQL_PID: 'Developer'
47+
MSSQL_MEMORY_LIMIT_MB: '2048'
4648
options: >-
47-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'SSpaSS__1_123' -l 30 -Q 'SELECT 1'"
48-
--health-interval 4s
49-
--health-timeout 2s
50-
--health-retries 16
49+
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'SSpaSS__1_123' -l 30 -Q 'SELECT 1' -No"
50+
--health-interval 10s
51+
--health-timeout 5s
52+
--health-retries 10
53+
--health-start-period 30s
5154
ports:
5255
- 11433:1433
5356

0 commit comments

Comments
 (0)