-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
Summary
Add a GitHub Actions workflow that automatically tests all stored procedures against SQL Server 2019 and 2022 on every PR. This catches syntax errors, runtime failures, and version-specific regressions before they reach manual testing.
Proposed Workflow
File: .github/workflows/sql-tests.yml
Triggers: PR to dev/main, push to dev
Matrix: SQL Server 2019 + 2022 (parallel, fail-fast: false)
Steps:
- Spin up SQL Server in Docker (
mcr.microsoft.com/mssql/server) - Create test database with Query Store enabled
- Install all procs from
Install-All/DarlingData.sql - Verify all 9 procedures exist (OBJECT_ID checks)
- Run
@help = 1for every procedure - Run default execution for safe procs (sp_PressureDetector, sp_PerfCheck, sp_HealthParser, sp_LogHunter, sp_IndexCleanup, sp_QuickieStore)
- Help-only for procs needing XE/special setup (sp_HumanEvents, sp_HumanEventsBlockViewer, sp_QueryReproBuilder)
What this catches:
- Syntax errors in any procedure
- Runtime failures on specific SQL Server versions
- Missing object references
- Parameter validation issues
- Regressions when modifying procedures
Test Files
.github/sql/test_help_output.sql— TRY/CATCH@help = 1per proc.github/sql/test_basic_execution.sql— Default execution for safe procs
Notes
- sp_QueryStoreCleanup excluded (destructive, not in DarlingData.sql)
- Uses
mssql-tools18with-C -Noflags for both versions - Each version runs independently so one failure doesn't block the other
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels