Skip to content

Commit aa67a7a

Browse files
cliffhallclaude
andcommitted
chore(ci): run the test suites on Windows runners (#1149)
Add a test-windows job to typescript.yml and python.yml: one leg per server on windows-latest, running only the test suite (npm test, pytest). Format, lint, typecheck, coverage and builds do not depend on the OS and stay on the Ubuntu legs. docs/quality-gate.md records that these legs are the one CI check the local gate cannot reproduce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
1 parent 03bc908 commit aa67a7a

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

‎.github/workflows/python.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,36 @@ jobs:
9999
- name: Coverage
100100
run: npm run coverage:py -- ${{ matrix.package }}
101101

102+
# The test suites on Windows (#1149), beside the Ubuntu `test` legs. Only
103+
# pytest: ruff, pyright and the build do not depend on the OS.
104+
test-windows:
105+
timeout-minutes: 20
106+
needs: [detect-packages]
107+
strategy:
108+
fail-fast: false
109+
matrix:
110+
package: ${{ fromJson(needs.detect-packages.outputs.packages) }}
111+
name: Test ${{ matrix.package }} (Windows)
112+
runs-on: windows-latest
113+
steps:
114+
- uses: actions/checkout@v6
115+
116+
- name: Install uv
117+
uses: astral-sh/setup-uv@v7
118+
119+
- name: Set up Python
120+
uses: actions/setup-python@v7
121+
with:
122+
python-version-file: "src/${{ matrix.package }}/.python-version"
123+
124+
- name: Install dependencies
125+
working-directory: src/${{ matrix.package }}
126+
run: uv sync --locked --all-extras --dev
127+
128+
- name: Run pytest
129+
working-directory: src/${{ matrix.package }}
130+
run: uv run --frozen pytest
131+
102132
build:
103133
timeout-minutes: 10
104134
needs: [detect-packages, test]

‎.github/workflows/typescript.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,37 @@ jobs:
122122
working-directory: src/${{ matrix.package }}
123123
run: npm run coverage
124124

125+
# The test suites on Windows (#1149). Every other job runs on Ubuntu, so
126+
# Windows-only code paths (drive letters, UNC shares, no O_NOFOLLOW, rename
127+
# over a locked file) were only ever exercised by mocking `path.win32`. This
128+
# leg runs each server's own `npm test` on a real Windows runner. It is tests
129+
# only: format, lint, typecheck and coverage do not depend on the OS and stay
130+
# in the Ubuntu legs above.
131+
test-windows:
132+
timeout-minutes: 20
133+
needs: [detect-packages]
134+
strategy:
135+
fail-fast: false
136+
matrix:
137+
package: ${{ fromJson(needs.detect-packages.outputs.packages) }}
138+
name: Test ${{ matrix.package }} (Windows)
139+
runs-on: windows-latest
140+
steps:
141+
- uses: actions/checkout@v6
142+
143+
- uses: actions/setup-node@v7
144+
with:
145+
node-version: 22
146+
cache: npm
147+
148+
# The same install as the `validate` leg; its `prepare` builds `dist/`.
149+
- name: Install dependencies
150+
run: npm ci --workspace src/${{ matrix.package }} --include-workspace-root
151+
152+
- name: Run tests
153+
working-directory: src/${{ matrix.package }}
154+
run: npm test
155+
125156
# The boot smoke (#4871): every server started the way a client starts it —
126157
# the built `dist/index.js` for the TypeScript servers, the console script
127158
# through `uv run` for the Python ones — over each transport it implements,

‎docs/quality-gate.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ your machine. It is the strongest predictor of a green CI there is here, though
2222
not a proof: CI runs on Linux, on a fresh `npm ci`, with Node 22 and each
2323
Python server's pinned interpreter.
2424

25+
**The one exception is the Windows legs** (#1149): `test-windows` in both
26+
workflows runs each server's test suite (`npm test`, `pytest`) on a
27+
`windows-latest` runner. The gate runs the same suites, but only on your
28+
machine's OS, so a Windows-only failure (a drive letter, a UNC path, a missing
29+
`O_NOFOLLOW`, a locked file) shows up first in CI. When a PR touches
30+
platform-specific code, wait for those legs, not just the gate.
31+
2532
The inner-loop commands are subsets. They are for speed while working, and are
2633
never a substitute for the gate.
2734

0 commit comments

Comments
 (0)