Skip to content

ci: run CI on Windows beside Linux - #97

Merged
Upd4ting merged 5 commits into
mainfrom
ci/windows
Nov 13, 2026
Merged

Upd4ting merged 5 commits into
mainfrom
ci/windows

Conversation

@Upd4ting

@Upd4ting Upd4ting commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

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@v1 now takes windows: true, which adds the node and test jobs on windows-latest.

What

  • .github/workflows/ci.yml passes windows: true. On Windows, setup-commands starts the runner's own PostgreSQL 17 ($PGBIN/pg_ctl, user postgres, password root, per the windows-2025 image readme) with fsync=off, creates antelopejs_test and exports PG_TEST_URL. scripts/test.sh already runs both suites against PG_TEST_URL one after the other.
  • .gitattributes checks out every text file with LF.
  • @antelopejs/tooling-configs goes from 0.5.5 to 0.5.8, the release with Windows support for the pack's checks. Its antelopejs-sync refreshes the managed README table and the verify-module skill.

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. Both Test 22 on Windows and Test 24 on Windows fail before any test runs:

✖ (HTTP code 500) server error - invalid volume specification: '//var/run/docker.sock:/var/run/docker.sock:rw'
 ELIFECYCLE  Test failed. See above for more details.

The Windows runner's Docker runs Windows containers, so postgres:18-alpine cannot start. The fix points the suites at the runner's PostgreSQL service through PG_TEST_URL.

2. The conformance race test timed out on durable commits

With the service started and fsync on, run https://github.com/AntelopeJS/postgres/actions/runs/43434825650 (attempt 1), Test 22 on Windows:

  1633 passing (18s)
  1 failing
  1) Atomic mutation provider conformance
       applies one competing update with its full patch:
     Error: Timeout of 2000ms exceeded.

The same test took 43 ms on Test 24 on Windows in 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 a before hook.

Commit latency on the Windows runner, measured with pgbench -n -N -c 2 -T 20 on four jobs (scratch run https://github.com/AntelopeJS/postgres/actions/runs/43435354834):

Server Latency average Worst 2 s stddev
default (fsync on) 2.21 to 3.09 ms 12.4 ms
-c fsync=off 0.23 to 0.66 ms 37.5 ms (one stall)

Each 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=off lowers 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:

    ✔ applies one competing update with its full patch
    ✔ serializes revision deletion against update
    ✔ protects refreshes from scalar cleanup
  1634 passing (6s)

Before the change, 1 of 6 Windows test jobs with fsync on 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.yml sets core.autocrlf false, which hides this in CI. A developer clone with core.autocrlf=true, before:

$ git -c core.autocrlf=true clone https://github.com/AntelopeJS/postgres.git && cd postgres
$ git ls-files --eol scripts/test.sh
i/lf    w/crlf  attr/                 	scripts/test.sh
$ PG_TEST_URL=x ./scripts/test.sh
env: ‘bash\r’: No such file or directory

After, same clone of this branch:

i/lf    w/lf    attr/text=auto eol=lf 	scripts/test.sh
./scripts/test.sh: line 4: ajs: command not found

The script now starts; ajs is absent only because the bare clone has no node_modules.

Checks

pnpm run checks locally: Checks: 11 passed, 0 failed.

@Upd4ting
Upd4ting marked this pull request as ready for review November 13, 2026 13:50
@Upd4ting
Upd4ting merged commit fbf8774 into main Nov 13, 2026
40 checks passed
@Upd4ting
Upd4ting deleted the ci/windows branch November 13, 2026 13:50
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.

1 participant