ci: install fixtures/ node deps in the gate itself
The runner clones a fresh worktree per branch, so fixtures/node_modules (gitignored, like any node_modules) never carries over from a prior run. The first real CI run on this branch failed with ERR_MODULE_NOT_FOUND for yjs because of exactly this -- the gate worked locally only because that worktree already had npm install run in it once, by hand. npm ci against fixtures/package-lock.json rather than a bare npm install, so the installed yjs stays pinned at 13.6.27 instead of whatever install would otherwise resolve.
2 files changed,
+15
−2
.amadan/README.md+6 −1.amadan/ci.d/10-gate+9 −1
CI passed — run details
diff --git a/.amadan/README.md b/.amadan/README.md| index 37695eb..f7efe12 100644 |
| --- a/.amadan/README.md |
| +++ b/.amadan/README.md |
| @@ -5,11 +5,16 @@ amadan remote, and it is the same script you can run locally — one |
| definition rather than two that drift. |
| It requires a Rust toolchain with the `wasm32-unknown-unknown` target, Go |
| -with `CGO_ENABLED=0`, and Node with `fixtures/` installed. The gate sources |
| +with `CGO_ENABLED=0`, and Node with `npm` on `PATH`. The gate sources |
| `~/.cargo/env` itself and checks every tool up front, so a missing |
| dependency fails on the first line with its own name rather than fifty |
| lines in as `cargo: command not found`. |
| +The runner clones a fresh worktree per branch, so `fixtures/node_modules` |
| +never carries over — the gate runs `npm ci` itself, against |
| +`fixtures/package-lock.json`, so the installed `yjs` is always exactly |
| +13.6.27 rather than whatever a bare `npm install` would resolve. |
| + |
| ## The runner |
| Jobs are claimed by an `amadan runner` on the machine that has one. Two |
diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate| index 9e6547c..effe869 100755 |
| --- a/.amadan/ci.d/10-gate |
| +++ b/.amadan/ci.d/10-gate |
| @@ -11,7 +11,7 @@ set -euo pipefail |
| # machine is not a gate. |
| [ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" |
| -for tool in cargo rustc go node; do |
| +for tool in cargo rustc go node npm; do |
| command -v "$tool" >/dev/null || { echo "gate: $tool not on PATH" >&2; exit 1; } |
| done |
| rustup target list --installed 2>/dev/null | grep -qx wasm32-unknown-unknown \ |
| @@ -19,6 +19,14 @@ rustup target list --installed 2>/dev/null | grep -qx wasm32-unknown-unknown \ |
| export CGO_ENABLED=0 |
| +# The runner clones a fresh worktree per branch, so fixtures/node_modules |
| +# (gitignored, like any node_modules) never carries over from a previous |
| +# run. npm ci reads fixtures/package-lock.json rather than resolving from |
| +# fixtures/package.json, so the installed yjs is exactly the pinned 13.6.27 |
| +# — no silent drift from whatever a bare `npm install` would pick. |
| +echo "=== fixtures: node dependencies" |
| +(cd fixtures && npm ci) |
| + |
| echo "=== rust: build, clippy, test" |
| cargo build --release --manifest-path core/Cargo.toml |
| cargo clippy --manifest-path core/Cargo.toml -- -D warnings |