Repository navigation
ci: run CI on Windows beside Linux - #97
Merged
Merged
Conversation
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.
Why
Run this repo's CI on Windows beside Linux, so the AntelopeJS stack is known to work on Windows (ANT-2223). The shared
ci-node.yml@v1now takeswindows: true, which adds the node and test jobs onwindows-latest.What
.github/workflows/ci.ymlpasseswindows: true. On Windows,setup-commandsstarts the runner's own PostgreSQL 17 ($PGBIN/pg_ctl, userpostgres, passwordroot, per the windows-2025 image readme) withfsync=off, createsantelopejs_testand exportsPG_TEST_URL.scripts/test.shalready runs both suites againstPG_TEST_URLone after the other..gitattributeschecks out every text file with LF.@antelopejs/tooling-configsgoes from 0.5.5 to 0.5.8, the release with Windows support for the pack's checks. Itsantelopejs-syncrefreshes the managed README table and theverify-moduleskill.No test is skipped on Windows. No lint rule, timeout or guardrails ceiling changed.
Proof
1. Testcontainers cannot run on the Windows runner
Before, the first run with
windows: true: https://github.com/AntelopeJS/postgres/actions/runs/43434436049. BothTest 22 on WindowsandTest 24 on Windowsfail before any test runs:The Windows runner's Docker runs Windows containers, so
postgres:18-alpinecannot start. The fix points the suites at the runner's PostgreSQL service throughPG_TEST_URL.2. The conformance race test timed out on durable commits
With the service started and
fsyncon, run https://github.com/AntelopeJS/postgres/actions/runs/43434825650 (attempt 1),Test 22 on Windows:The same test took 43 ms on
Test 24 on Windowsin that run. In the failing job every write-heavy test of that window was 15 to 30 times slower (serializes revision deletion against update (1147ms)), while the database-free tests beside them stayed below a millisecond. The test lives in@antelopejs/interface-database's conformance suite, and its schema is already built in abeforehook.Commit latency on the Windows runner, measured with
pgbench -n -N -c 2 -T 20on four jobs (scratch run https://github.com/AntelopeJS/postgres/actions/runs/43435354834):fsyncon)-c fsync=offEach commit waits on a disk flush that costs 4 to 12 times the statement itself. The test server is created for the run and thrown away, so it does not need durability.
fsync=offlowers the baseline cost; it does not remove host stalls.After, with
fsync=off: https://github.com/AntelopeJS/postgres/actions/runs/43436065244, run three times. 6 of 6 Windows test jobs pass, with every race test under mocha's 75 ms slow mark:Before the change, 1 of 6 Windows test jobs with
fsyncon timed out. That sample alone cannot prove a flake rate; the latency table above is the measured cause.3. CRLF checkouts break the test script
ci-node.ymlsetscore.autocrlf false, which hides this in CI. A developer clone withcore.autocrlf=true, before:After, same clone of this branch:
The script now starts;
ajsis absent only because the bare clone has nonode_modules.Checks
pnpm run checkslocally:Checks: 11 passed, 0 failed.