Delete plans directory #16
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| typescript: | |
| name: TypeScript (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ["18", "20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - run: npm ci | |
| working-directory: packages/ts | |
| - run: npm run build | |
| working-directory: packages/ts | |
| - run: npm test | |
| working-directory: packages/ts | |
| rust: | |
| name: Rust | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - run: cargo fmt --all -- --check | |
| working-directory: crates/validator | |
| - run: cargo clippy --all-targets -- -D warnings | |
| working-directory: crates/validator | |
| - run: cargo test | |
| working-directory: crates/validator | |
| # Curated≡vendored parity gate (README "Toward 1.0.0" item 2 / DESIGN.md §2.3). | |
| # | |
| # The de-duplicated curated schemas (schemas/curated/*.json + core.json) are the single sources of | |
| # truth the validator loads; the vendored originals (schemas/vendored/) are the verbatim upstream | |
| # quote. This job enforces the two stay in lock-step: | |
| # 1. Bundler determinism: regenerate schemas/curated/bundled/ from the authored sources and assert | |
| # the committed output is byte-identical — catches "edited core.json but forgot to re-bundle + | |
| # commit". (The Rust-side snapshot drift guard, vendored_parity.rs, is the downstream analog: | |
| # it asserts that same committed bundled output matches the embedded _vendored snapshot.) | |
| # 2. Outcome parity: run the curated≡vendored corpus comparison explicitly so the guarantee is a | |
| # named status check (also exercised by the typescript job's full `npm test`). | |
| curated-parity: | |
| name: Curated parity | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - run: npm ci | |
| - name: Re-bundle curated schemas | |
| run: npm run bundle | |
| - name: Committed bundled output is fresh | |
| run: git diff --exit-code -- schemas/curated/bundled/ | |
| - name: Curated ≡ vendored outcome parity | |
| run: npm run test:curated-parity -w @jsonstat-validator/ts | |
| wasm: | |
| name: WebAssembly | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| # Build the TS surface first: the Wasm parity test imports @jsonstat-validator/ts. | |
| - run: npm ci | |
| - run: npm run build -w @jsonstat-validator/ts | |
| # `npm test` runs `pretest` (wasm-pack -t web -> packages/wasm/pkg, with the getrandom cfg set | |
| # in tools/build.mjs) then the TS<->Wasm corpus parity test (packages/wasm/test/parity.test.ts). | |
| - run: npm test -w @jsonstat-validator/wasm |