From f4f45436b479d8c6eebcf7a503d3c1e3a73c68b1 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 8 Oct 2025 21:46:23 -0400 Subject: Add test pipeline with sourcehut --- scripts/test-mssql.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/test-mssql.sh (limited to 'scripts/test-mssql.sh') diff --git a/scripts/test-mssql.sh b/scripts/test-mssql.sh new file mode 100755 index 0000000..1569992 --- /dev/null +++ b/scripts/test-mssql.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +echo "Running MSSQL tests..." +env $(cat .env.mssql | xargs) docker-compose -f docker-compose.mssql.yml up -d + +echo "Waiting for MSSQL to be ready..." +sleep 20 + +# Read password from .env.mssql if available +MSSQL_PASSWORD="${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd}" + +until docker exec bolt_mssql_db /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$MSSQL_PASSWORD" -Q "SELECT 1" &>/dev/null; do + echo "Waiting for MSSQL..." + sleep 5 +done +echo "MSSQL is ready." + +env $(cat .env.mssql | xargs) go test -p 1 -tags "mssql" -covermode=count -coverprofile=coverage-mssql.out ./... + +docker-compose -f docker-compose.mssql.yml down +echo "MSSQL tests completed." -- cgit v1.2.3