You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(workflows): enhance SQL Server debugging and readiness checks
Improve the workflow for .NET tests by adding more robust SQL Server service checks and debugging steps. This ensures better reliability and visibility during the CI process.
- Added SQL Server service state debugging step.
- Implemented waiting mechanism for SQL login readiness.
- Moved database creation step to ensure it runs after SQL Server is ready.
- Enhanced logging for SQL Server container failures.
-Q "IF DB_ID(N'TestDatabase') IS NULL CREATE DATABASE [TestDatabase]; IF DB_ID(N'TestDatabase2') IS NULL CREATE DATABASE [TestDatabase2]; IF DB_ID(N'MockDatabase') IS NULL CREATE DATABASE [MockDatabase]; IF DB_ID(N'MockDatabaseForMockMapping') IS NULL CREATE DATABASE [MockDatabaseForMockMapping];"
129
+
130
+
- name: Debug SQL logs on failure
131
+
if: ${{ failure() }}
132
+
shell: bash
133
+
run: |
134
+
echo "Dumping SQL Server container logs due to earlier failure."
-Q "IF DB_ID(N'TestDatabase') IS NULL CREATE DATABASE [TestDatabase]; IF DB_ID(N'TestDatabase2') IS NULL CREATE DATABASE [TestDatabase2]; IF DB_ID(N'MockDatabase') IS NULL CREATE DATABASE [MockDatabase]; IF DB_ID(N'MockDatabaseForMockMapping') IS NULL CREATE DATABASE [MockDatabaseForMockMapping];"
114
-
115
151
- name: Test
116
152
run: dotnet test "$SOLUTION_FILE" /p:Configuration=$BUILD_CONFIG --no-build --verbosity normal --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" $TEST_FILTER
0 commit comments