fix: make the chain grouping comment-aware so a gap line comment never welds onto a trailer #2137
Workflow file for this run
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
| # Three jobs run on every push to main and every PR: | |
| # | |
| # check — runs the local `deno task check` gate verbatim, so the two cannot | |
| # drift: rustfmt, typecheck, the audit suite, cargo + deno tests, | |
| # AST-type drift, clippy with -D warnings. The authoritative list is | |
| # the `check` task in deno.json — deliberately NOT re-enumerated here, | |
| # because a hand-copied list goes stale every time an audit is added. | |
| # pins:audit here is the pin-AGREEMENT half only (a repo fact, so it | |
| # holds on this clean checkout); checkout alignment is the separate | |
| # pins:audit:checkouts task, gated at conformance cadence where the | |
| # sibling checkouts are actually read. The pinned-count guards that run | |
| # in CI are the committed-tree ones (fixtures_validate via cargo test, | |
| # swallow_audit). Likewise roundtrip:audit:prettier warn-SKIPS here — | |
| # it widens onto a ../prettier checkout, which this runner has no | |
| # reason to clone — so a green CI run does not cover that leg; it | |
| # gates on a dev machine and at conformance cadence (audit:corpus). | |
| # artifacts — publish-parity: builds the WASM/npm packages, checks size | |
| # bounds, runs the Node package tests (see the job comment). | |
| # platforms — macOS + Windows confidence for the native builds: the full | |
| # `cargo test --workspace` suite plus the N-API JS-boundary and | |
| # npm-package tests, per OS (see the job comment). Linux is | |
| # covered by `check`. | |
| # | |
| # `check` needs Rust *and* Deno: the fixture suite drives prettier + svelte | |
| # through a Deno sidecar (npm: specifiers pinned in | |
| # crates/tsv_debug/src/deno/sidecar.ts and locked by its sibling deno.lock, | |
| # frozen at runtime — hence the cache-hash on both below), so | |
| # `cargo test --workspace` panics without Deno — tests/fixtures_tests.rs | |
| # health-checks the sidecar first. wasm-pack is not needed by `check`. | |
| name: check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: ['**'] | |
| # Allow manually re-running checks from the Actions tab. | |
| workflow_dispatch: | |
| concurrency: | |
| group: check-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| # This job only reads the repo; deny everything else (least privilege). | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| # The fixture suite fetches pinned npm packages at runtime (frozen to the | |
| # sidecar deno.lock), so bound the job to fail fast on a registry stall or hung sidecar | |
| # instead of running to the 6h default. | |
| timeout-minutes: 30 | |
| steps: | |
| # persist-credentials: false keeps the GITHUB_TOKEN out of .git/config (no step here pushes via git). | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| # Pinned, not `stable`: the workspace runs clippy::nursery at warn and the | |
| # `lint` task denies warnings, so a floating toolchain would fail CI | |
| # whenever a new Rust release adds a nursery lint. Edition 2024 needs | |
| # >= 1.85. Bump deliberately. | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (no semver tags; bump manually) | |
| with: | |
| toolchain: 1.94.1 | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: Install Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| # Pinned to match local: deno drives the prettier/svelte fixture oracle | |
| # and `deno test`, so a floating minor could shift behavior the pinned | |
| # Rust toolchain can't guard. Bump deliberately. | |
| deno-version: 2.8.0 | |
| # Round-trips DENO_DIR across runs — captures the sidecar's runtime | |
| # npm fetches (prettier/svelte/acorn) since those land in DENO_DIR. | |
| cache: true | |
| # Key on the sidecar pins (fetched at runtime, not lockfile-pinned) so a | |
| # bump invalidates the cached deps. The sidecar's prettier/svelte fetches | |
| # are the only runtime npm `check` does: `test:deno` runs the | |
| # dependency-free divergence suite (node: builtins + relative imports, no | |
| # node_modules — proven by a clean checkout), and the bench's heavy npm | |
| # tree (biome/oxc/oxfmt) is never installed here. The only deno.lock is the | |
| # sidecar's (crates/tsv_debug/src/deno/deno.lock, embedded + frozen); the | |
| # bench resolves npm from package-lock.json and the root has no external deps. | |
| cache-hash: ${{ hashFiles('crates/tsv_debug/src/deno/sidecar.ts', 'crates/tsv_debug/src/deno/actor.rs', 'crates/tsv_debug/src/deno/deno.lock') }} | |
| - name: Check | |
| run: deno task check | |
| # Publish-parity gate: builds every WASM/npm artifact, checks the size | |
| # bounds, and runs the Node package tests — none of which `check` exercises, | |
| # so a packaging break surfaces on PRs instead of at release time. Runs the | |
| # same `build:packages` task as scripts/publish.ts (6 wasm-pack release builds | |
| # + wasm-opt), so the two can't drift. | |
| artifacts: | |
| runs-on: ubuntu-latest | |
| # Runs in parallel with `check` (no `needs:`) so PR wall-clock is | |
| # max(check, artifacts), not the sum. Tradeoff: a PR that fails `check` | |
| # still burns the artifact build. Re-add `needs: check` to trade that | |
| # latency back for not spending build minutes on red PRs. | |
| # Generous headroom over the cold wasm-only build (6 wasm-pack release builds | |
| # + wasm-opt; wasm-pack itself is now a prebuilt download, not a source | |
| # compile) — well short of the 6h default so a hang fails fast. | |
| timeout-minutes: 45 | |
| steps: | |
| # persist-credentials: false keeps the GITHUB_TOKEN out of .git/config (no step here pushes via git). | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (no semver tags; bump manually) | |
| with: | |
| toolchain: 1.94.1 | |
| targets: wasm32-unknown-unknown | |
| # Caches the wasm32 dependency builds across runs (keyed on Cargo.lock). | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| # Prebuilt binary, not `cargo install` from source: a source build is keyed | |
| # by rust-cache on Cargo.lock, so any dep bump forced a multi-minute wasm-pack | |
| # recompile. The download is independent of the cache and runs in seconds. | |
| # Version pinned to match local: wasm-pack bundles wasm-opt, whose output size | |
| # the ~±8% validate:artifacts bounds are calibrated against — a float would trip | |
| # the size gate on an unrelated binaryen release. Bump the SHA and wasm-pack | |
| # version manually. | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@7f4eb899022d8fe70b20c4f3de697aa85c309026 # v2.85.11 | |
| with: | |
| tool: wasm-pack@0.15.0 | |
| - name: Install Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| # Pinned to match the check job / local. Bump deliberately. | |
| deno-version: 2.8.0 | |
| cache: true | |
| - name: Install Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| # Pinned to match local. Needs >= 22.18 for native .ts type stripping | |
| # (scripts/test_npm.ts runs under node --test directly). Bump deliberately. | |
| node-version: '24.14.1' | |
| # Builds only the publishable wasm bundles (npm + deno) — exactly what | |
| # scripts/publish.ts builds and what validate:artifacts / test:npm consume. | |
| # NOT `build:all`: that prepends an LTO release workspace build + FFI lib that | |
| # nothing here validates (publish skips them too), so they were pure overhead. | |
| - name: Build packages | |
| run: deno task build:packages | |
| - name: Validate artifact sizes | |
| run: deno task validate:artifacts | |
| # All three published shapes differ (format excludes convert, parse | |
| # bundles the .d.ts, all ships the tsv bin), so test each. The `:run` | |
| # variants skip the per-package rebuild the bare `test:npm*` wrappers do — | |
| # `build:packages` above already built all six bundles. | |
| - name: Node package tests | |
| run: | | |
| deno task test:npm:run | |
| deno task test:npm:parse:run | |
| deno task test:npm:all:run | |
| # Platform confidence for the native builds: the committed-tree test suite | |
| # (fixtures, CLI integration, the napi in-crate tests) plus the real N-API | |
| # JS-boundary test, on each OS a native artifact will ship for. Linux is | |
| # already covered by `check` (`deno task check` runs `cargo test --workspace` | |
| # on ubuntu), so the matrix is macOS + Windows; macos-15 runners are arm64, | |
| # which is also aarch64 coverage. Deliberately NOT the full `deno task check`: | |
| # rustfmt/clippy/typecheck/the audits are platform-independent and already | |
| # gate on ubuntu — duplicating them here is wall-clock for no new signal. | |
| # The highest-yield surfaces per OS are path handling (tsv_ignore / | |
| # tsv_discover / tsv_cli discovery, exercised by cli_tests) and the native | |
| # cdylib boundary (test:napi). Byte-exact fixtures survive Windows checkout | |
| # because .gitattributes pins eol=lf. | |
| platforms: | |
| strategy: | |
| # A Windows failure must not cancel the macOS signal (or vice versa) — | |
| # per-OS triage needs both results every run. | |
| fail-fast: false | |
| matrix: | |
| os: [macos-15, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| # Windows runners build roughly 2x slower than ubuntu; generous headroom, | |
| # still far from the 6h default so a hung sidecar fails fast. | |
| timeout-minutes: 60 | |
| steps: | |
| # persist-credentials: false keeps the GITHUB_TOKEN out of .git/config (no step here pushes via git). | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| # Same pin as `check`; no clippy/rustfmt components — lints gate on ubuntu. | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (no semver tags; bump manually) | |
| with: | |
| toolchain: 1.94.1 | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| # `cargo test --workspace` needs Deno: the fixture suite drives prettier + | |
| # svelte through the Deno sidecar (see the `check` job comment; same | |
| # cache-hash reasoning — the sidecar's npm pins are fetched at runtime). | |
| - name: Install Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| # Pinned to match the check job / local. Bump deliberately. | |
| deno-version: 2.8.0 | |
| cache: true | |
| cache-hash: ${{ hashFiles('crates/tsv_debug/src/deno/sidecar.ts', 'crates/tsv_debug/src/deno/actor.rs', 'crates/tsv_debug/src/deno/deno.lock') }} | |
| # For test:napi's runner (`node --test` executes the .ts directly via | |
| # native type stripping, >= 22.18). Pinned to match the artifacts job. | |
| - name: Install Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24.14.1' | |
| # --no-fail-fast: cargo test stops at the first failing test BINARY by | |
| # default, hiding every later suite — the platform burn-down wants all | |
| # failures per run, not one per push. | |
| - name: Test | |
| run: cargo test --workspace --no-fail-fast | |
| # The real N-API JS boundary against this OS's napi-profile cdylib | |
| # (release + unwind, built with the test-only panic probe so the | |
| # panic-contract test runs; per-OS naming — .dll / .dylib — handled by | |
| # benches/js/lib/runtime.ts). This is the only tsv_napi build on every PR | |
| # (release_napi.yml builds it on tags, dispatch, and a weekly cron). | |
| # Runs even when Test fails (independent signal | |
| # during the burn-down; its own failure still fails the job). | |
| - name: N-API boundary test | |
| if: ${{ !cancelled() }} | |
| run: deno task test:napi | |
| # The staged npm shape on this OS: loader platform-resolution (per-OS | |
| # triple detection), the wasm-parity options surface, and the packaged | |
| # .node — what a real `npm i @fuzdev/tsv` consumer executes. | |
| - name: N-API npm package test | |
| if: ${{ !cancelled() }} | |
| run: deno task test:napi:npm |