Add SQL Server PR smoke tests - #4026
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a3f210bdb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| changed_scripts=() | ||
| while IFS= read -r changed_script; do | ||
| [[ -n "$changed_script" ]] && changed_scripts+=("$changed_script") | ||
| done < <(discover_changed_sp_scripts) |
There was a problem hiding this comment.
Propagate changed-file discovery failures
When changed-file discovery cannot run, this process substitution hides the failure: for example, with neither CHANGED_SQL_FILES nor the GitHub diff env vars set, discover_changed_sp_scripts prints its error and exits 1, but the loop still completes with an empty array and the script exits 0 after reporting that there were no scripts to test. The same fail-open pattern can mask discovery failures, so capture the function output/status before populating changed_scripts and fail the job if discovery fails.
Useful? React with 👍 / 👎.
Summary
Adds a GitHub Actions workflow that starts SQL Server Developer Edition and smoke-tests changed root-level
sp_*.sqlscripts in pull requests.The workflow intentionally avoids generated release artifacts like
Install-All-Scripts.sql,Install-Azure.sql,SqlServerVersions.sql, andUninstall.sql. Instead, it discovers root-level stored procedure scripts changed by the PR, installs each individually, verifies that the procedure exists, and runs its@VersionCheckMode = 1check.Validation
bash -n .github/scripts/run-sql-server-smoke-tests.shYAML.load_filesp_Blitz.sqlwas tested and ignored install/subfolder/utility SQL filesNotes
This is based on
mainso it can be merged separately from pendingdevbranch work.