Repository navigation
ci: install SQL Server once per Windows job and test each Node.js version in turn - #1850
Open
arthurschreiber wants to merge 2 commits into
Open
arthurschreiber wants to merge 2 commits into
arthurschreiber wants to merge 2 commits into
Conversation
…sion in turn The Windows test matrix ran one job per SQL Server and Node.js version, so each of the 15 jobs spent 4-6 minutes installing SQL Server. Jobs for SQL Server 2016 to 2022 now install it once and run the tests on Node.js 22, 24 and 26 one after the other, installing dependencies only once. SQL Server 2025 keeps one job per Node.js version: it hashes login passwords with PBKDF2, which makes its test runs about 2.5 times slower, so a combined job would roughly double the workflow's duration. This keeps all 15 combinations while cutting the Windows jobs from 15 to 7 and their total runtime by about a third. The unit tests and the per-TDS-version integration passes move to .github/scripts/run-tests.sh so each Node.js version reuses them. Every pass runs even if an earlier one fails, and each writes its own lcov report for a single Codecov upload per Node.js version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UtKcuTtreGucZaJVrWrLrS
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1850 +/- ##
==========================================
- Coverage 85.24% 84.21% -1.03%
==========================================
Files 97 97
Lines 4778 4778
Branches 896 896
==========================================
- Hits 4073 4024 -49
- Misses 447 503 +56
+ Partials 258 251 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Windows test matrix ran one job per SQL Server × Node.js version. Each of the 15 jobs spent 4–6 minutes installing SQL Server and about a minute on
npm ci, and only about 3 minutes running tests.This keeps all 15 combinations but reorganises the jobs:
node_moduleshas no native builds, so it works on every version.The result is 7 Windows jobs instead of 15. From the timings of run #2048, total Windows runtime should drop from about 164 to about 111 minutes, and the slowest job should still take about 16–17 minutes.
Changes
.github/scripts/run-tests.sh(new) runs the unit tests and the five integration passes (TDS 7.4 → 7.1) with whichever Node.js version is active. Every pass runs even if an earlier one fails, each failure gets its own::error::annotation, and each pass writes its lcov report to its own directory undercoverage/.test-windowsuses aninclude:matrix with anode-versionslist and three Node.js slots. Slots 1 and 2 run even if an earlier slot failed. There is one Codecov upload per Node.js version, made only if that version's tests passed.actions.lockis unchanged.Notes for review
SQL Server 2016 Windows / Node.js 22.x, 24.x, 26.x. Any branch-protection rules that require the old names need updating.Testing
run-tests.shagainst a local SQL Server 2022 container. Pass counts match a baseline run, and every pass shows the same single failure: the dangling-socket timeout test, which needs network access the sandbox doesn't have. With no server, the script ran every pass, reported each failure and exited non-zero.Generated by Claude Code