Skip to content

Restructure README "How it measures up": one map over both scoreboard… #210

Restructure README "How it measures up": one map over both scoreboard…

Restructure README "How it measures up": one map over both scoreboard… #210

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Node 24+ runs the .ts sources directly (native type stripping) — no build, no tsx.
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- name: Typecheck
run: npx tsc --noEmit
# Regenerate every grammar's artifacts and fail if any drifts from the committed
# files (someone edited a grammar but forgot to regenerate). Covers all four
# grammars (sources at the repo root) + the tree-sitter packages.
- name: Generate editor artifacts (must be in sync)
run: |
npm run gen
git diff --exit-code -- '*.tmLanguage.json' '*.language-configuration.json' '*.monarch.json' '*.cst-types.ts' '*.contributes.json' tree-sitter
# Every correctness GATE through ONE runner — sanity / agnostic / conformance /
# highlighter / vue / yaml / the generative scope≡role check / the gap-ledger selftest
# + --check (stale KNOWN-GAPS.md fails). One ✓/✗ summary, one exit code. The comparative
# METRICS (scope-gap / src-coverage) and BENCH tools need the external TS corpus / VS Code
# grammars and run in the readme-bench workflow, not here. See TESTING.md for the taxonomy.
- name: Test
run: npm run check
# The derived tree-sitter highlighter is the strongest thesis proof (a real GLR
# parser from the same grammar, beating the official hand-written one). Build its
# wasm and gate the accuracy so the 95.9% is verified, not just claimed. The
# tree-sitter CLI bundles its own wasm toolchain — no emscripten/docker needed.
treesitter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
# Cheap LR-conflict gate: `tree-sitter generate` (no wasm) for every derived
# grammar that is a tree-sitter target, so a conflict introduced by a grammar
# change is caught even for the dialects whose wasm is not built below (tsx/js/jsx)
# — exactly the gap that let an unresolved `type`/`class_heritage` conflict ship.
# yaml is now included (issue #3): its indent/scalar tokens are wired as tree-sitter
# externals and the C indentation scanner is implemented, so its grammar generates + builds.
- name: Generate every derived tree-sitter grammar (conflict gate, no wasm)
run: |
for g in typescript typescriptreact javascript javascriptreact html yaml; do
echo "── tree-sitter generate: $g"
( cd "tree-sitter/$g" && npx tree-sitter generate )
done
- name: Build the derived tree-sitter grammar to wasm
run: |
cd tree-sitter/typescript
npx tree-sitter generate
npx tree-sitter build --wasm .
- name: Tree-sitter accuracy gate (≥ floor, must beat official)
run: node test/treesitter-bench.ts
- name: Build + gate the derived HTML tree-sitter grammar (v1, vs parse5)
run: |
cd tree-sitter/html
npx tree-sitter generate
npx tree-sitter build --wasm .
cd ../..
node test/html-treesitter.ts
# The derived YAML tree-sitter (issue #3) — build the wasm (its C indentation scanner must
# compile + link). The accuracy bench (test/treesitter-yaml-bench.ts) needs the yaml-test-suite
# checkout, so it runs in the readme-bench workflow where the suite is already cloned.
- name: Build the derived YAML tree-sitter grammar to wasm
run: |
cd tree-sitter/yaml
npx tree-sitter generate
npx tree-sitter build --wasm .