Skip to content

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
masterfrom
claude/gifted-ride-kxbqh5
Open

arthurschreiber wants to merge 2 commits into
masterfrom
claude/gifted-ride-kxbqh5

Conversation

@arthurschreiber

Copy link
Copy Markdown
Collaborator

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:

  • SQL Server 2016, 2017, 2019, 2022: one job each. SQL Server and dependencies are installed once, then the tests run on Node.js 22, 24 and 26 in turn. node_modules has no native builds, so it works on every version.
  • SQL Server 2025: still one job per Node.js version. 2025 hashes SQL login passwords with PBKDF2. Measured locally, a login takes ~60–67 ms against ~4–10 ms on 2022, and one integration pass makes ~460 logins. Its test runs are about 2.5× slower, so a combined job would take about twice as long as the others.

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 under coverage/.
  • test-windows uses an include: matrix with a node-versions list 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.
  • The job timeout goes from 20 to 40 minutes.
  • No new actions are used, so actions.lock is unchanged.
  • The Linux job is unchanged. It could use the same script in a follow-up.

Notes for review

  • Windows check names change, for example to SQL Server 2016 Windows / Node.js 22.x, 24.x, 26.x. Any branch-protection rules that require the old names need updating.
  • Jobs with a single Node.js version show the unused slot steps as skipped.

Testing

  • actionlint, shellcheck and zizmor (offline) report no new findings.
  • Ran run-tests.sh against 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.
  • Not yet run on GitHub's Windows runners; this PR's CI is the first real run.

Generated by Claude Code

…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

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.21%. Comparing base (61fb184) to head (2706fe5).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants