55#
66# Runs on every PR and push to main. Three jobs:
77# structural — fast structural checks (no compiler required)
8- # smoke — Deno harnesses (AffineScript parser + aspect/proof envelopes )
8+ # smoke — Node.js smoke test (AffineScript parser + example files )
99# build-e2e — Full Idris2 + Zig build then E2E
1010# cargo-verify — Cargo workspace build + test (typed-wasm-verify crate)
1111name : E2E Validation
3030 structural :
3131 name : Structural E2E (no-build)
3232 runs-on : ubuntu-latest
33+ timeout-minutes : 10
3334
3435 steps :
3536 - name : Checkout repository
@@ -39,76 +40,76 @@ jobs:
3940 run : E2E_BUILD=0 bash tests/e2e.sh
4041
4142 # --------------------------------------------------------------------------
42- # Job 2: Smoke test — Deno harness validation
43+ # Job 2: Smoke test — Node.js parser validation
4344 # --------------------------------------------------------------------------
4445 smoke :
45- name : Smoke test (Deno AffineScript harnesses )
46+ name : Smoke test (Node.js AffineScript parser )
4647 runs-on : ubuntu-latest
47- env :
48- # Scoped permissions covering the harnesses' needs (file read/write,
49- # subprocess spawn for idris2, env). See deno.json / Justfile `deno_run`.
50- DENO_RUN : " deno run --allow-read --allow-write --allow-run --allow-env --allow-sys"
48+ timeout-minutes : 10
5149
5250 steps :
5351 - name : Checkout repository
5452 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5553
56- # Deno is the project's JS runtime (estate npm→Deno migration, #133 /
57- # standards#253). deno.land is denied by some network policies, so install
58- # straight from the GitHub release assets — the same curl pattern the
59- # Idris2 / Zig steps use below.
60- - name : Install Deno
54+ - name : Set up Node.js
55+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
56+ with :
57+ node-version : ' 25'
58+
59+ - name : Install npm deps
60+ run : npm install --no-audit --no-fund --silent
61+
62+ # Phase 0 NOTE (issue #48): Track A's parser migration replaced
63+ # ReScript (.res + rescript.json + rescript build) with AffineScript
64+ # (.affine + affinescript.json + @hyperpolymath/affinescript compiler).
65+ # The compiler isn't yet declared as an npm dep in package.json so
66+ # `npm install` can't fetch it on a clean CI runner. Detect the
67+ # AffineScript or ReScript binary if either is present after install,
68+ # build with whichever is available, otherwise skip and let downstream
69+ # steps handle the artefact-absent case (they're already guarded).
70+ - name : Build parser (AffineScript preferred, ReScript fallback)
6171 run : |
62- DENO_VERSION="2.8.1"
63- curl -fsSL -o /tmp/deno.zip \
64- "https://github.com/denoland/deno/releases/download/v${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip"
65- mkdir -p "$HOME/.deno/bin"
66- unzip -oq /tmp/deno.zip -d "$HOME/.deno/bin"
67- echo "$HOME/.deno/bin" >> "$GITHUB_PATH"
68- "$HOME/.deno/bin/deno" --version
69-
70- # The AffineScript parser compiler is OCaml (opam + dune, NOT npm — see
71- # tools/provision.sh). Building it is expensive (~5 min) and is exercised by
72- # c5-regenerate.yml, not here. If it happens to be on PATH, build; otherwise
73- # skip and let the guarded steps below handle the artefact-absent case.
74- - name : Build parser (AffineScript, if provisioned)
75- run : |
76- if command -v affinescript >/dev/null 2>&1; then
77- echo "Building parser with AffineScript..."
78- affinescript build
72+ if [ -x node_modules/.bin/affinescript ]; then
73+ echo "Building with AffineScript..."
74+ node_modules/.bin/affinescript build
75+ elif [ -x node_modules/.bin/rescript ]; then
76+ echo "Building with ReScript (migration fallback)..."
77+ node_modules/.bin/rescript build
7978 else
80- echo "::warning::affinescript (OCaml) not provisioned — skipping parser build."
81- echo "::warning::smoke / property / benchmark steps will skip if src/parser/Parser.mjs is absent."
79+ echo "::warning::No parser compiler available — skipping build."
80+ echo "::warning::Track A parser-migration is incomplete; see #48."
81+ echo "::warning::Downstream smoke / aspect / property / benchmark"
82+ echo "::warning::steps will skip if src/parser/Parser.mjs is absent."
8283 fi
8384
8485 - name : Run smoke test (skip if parser artefacts absent)
8586 run : |
8687 if [ -f src/parser/Parser.mjs ]; then
87- $DENO_RUN tests/smoke/e2e-smoke.mjs
88+ node tests/smoke/e2e-smoke.mjs
8889 else
8990 echo "::warning::src/parser/Parser.mjs absent — skipping smoke test."
9091 fi
9192
9293 - name : Run aspect tests (claim + security envelopes — no parser dep)
9394 run : |
94- $DENO_RUN tests/aspect/claim-envelope.mjs
95- $DENO_RUN tests/aspect/security-envelope.mjs
95+ node tests/aspect/claim-envelope.mjs
96+ node tests/aspect/security-envelope.mjs
9697
9798 - name : Run property tests (skip if parser artefacts absent)
9899 run : |
99100 if [ -f src/parser/Parser.mjs ]; then
100- $DENO_RUN tests/property/property_test.mjs
101+ node tests/property/property_test.mjs
101102 else
102103 echo "::warning::src/parser/Parser.mjs absent — skipping property tests."
103104 fi
104105
105106 - name : Run proof regression (named theorems + idris2 typecheck if present)
106- run : $DENO_RUN tests/proof/regression.mjs
107+ run : node tests/proof/regression.mjs
107108
108109 - name : Run parser benchmark (skip if parser artefacts absent)
109110 run : |
110111 if [ -f src/parser/Parser.mjs ]; then
111- BENCH_ITERS=20 $DENO_RUN benchmarks/parser-bench.mjs
112+ BENCH_ITERS=20 node benchmarks/parser-bench.mjs
112113 else
113114 echo "::warning::src/parser/Parser.mjs absent — skipping benchmark."
114115 fi
@@ -119,6 +120,7 @@ jobs:
119120 build-e2e :
120121 name : Build + E2E (Idris2 + Zig)
121122 runs-on : ubuntu-latest
123+ timeout-minutes : 10
122124
123125 steps :
124126 - name : Checkout repository
@@ -159,18 +161,11 @@ jobs:
159161 tar -xJf /tmp/zig.tar.xz -C /opt
160162 ln -s "/opt/${ZIG_DIR}/zig" /usr/local/bin/zig
161163
162- # ---- Deno (JS runtime for the smoke harness within the E2E script) ----
163- # Installed from the GitHub release assets (deno.land is denied by some
164- # network policies); matches the curl pattern above. See tests/e2e.sh.
165- - name : Install Deno
166- run : |
167- DENO_VERSION="2.8.1"
168- curl -fsSL -o /tmp/deno.zip \
169- "https://github.com/denoland/deno/releases/download/v${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip"
170- mkdir -p "$HOME/.deno/bin"
171- unzip -oq /tmp/deno.zip -d "$HOME/.deno/bin"
172- echo "$HOME/.deno/bin" >> "$GITHUB_PATH"
173- "$HOME/.deno/bin/deno" --version
164+ # ---- Node (for smoke test within E2E script) ----
165+ - name : Set up Node.js
166+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
167+ with :
168+ node-version : ' 25'
174169
175170 # ---- Full E2E ----
176171 # Phase 0 NOTE (issue #48): this step has been persistently red since
@@ -195,6 +190,7 @@ jobs:
195190 cargo-verify :
196191 name : Cargo build + test (typed-wasm-verify)
197192 runs-on : ubuntu-latest
193+ timeout-minutes : 10
198194
199195 steps :
200196 - name : Checkout repository
@@ -214,12 +210,3 @@ jobs:
214210
215211 - name : Cargo test (workspace)
216212 run : cargo test --workspace --locked
217-
218- # Explicit named step for the IR-level round-trip corpus (#130).
219- # Already covered by the workspace test above, but naming it
220- # explicitly makes any regression in the verify(emit(m)) loop
221- # surface as a clearly-named failure. Surface .twasm corpus is
222- # blocked on the front-end → IR seam (#127); this is the cheap-wire
223- # half of #130.
224- - name : Round-trip soundness corpus (IR-level slice — refs # 130)
225- run : cargo test --test corpus -p typed-wasm-codegen --locked
0 commit comments