We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88eab73 commit a0582a9Copy full SHA for a0582a9
1 file changed
.github/workflows/pr-validation.yml
@@ -23,5 +23,14 @@ jobs:
23
export SQLCMDPASSWORD=$(date +%s|sha256sum|base64|head -c 32)
24
export SQLCMDUSER=sa
25
docker run -m 2GB -e ACCEPT_EULA=1 -d --name sql2022 -p:1433:1433 -e SA_PASSWORD=$SQLCMDPASSWORD mcr.microsoft.com/mssql/server:2022-latest
26
+ echo "Waiting for SQL Server to be ready..."
27
+ for i in {1..60}; do
28
+ if docker exec sql2022 /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$SQLCMDPASSWORD" -C -Q "SELECT 1" &>/dev/null; then
29
+ echo "SQL Server is ready!"
30
+ break
31
+ fi
32
+ echo "Attempt $i: SQL Server not ready yet, waiting..."
33
+ sleep 2
34
+ done
35
cd ../..
36
go test -v ./...
0 commit comments