Sharing Results from CI
Your CI already runs your test suite on main. With Squeal’s GitHub Action (hearsay-tools/squeal/ci@v0), CI records each test file’s content-keyed result and publishes it to a Git ref (refs/squeal/<commit>).
When a developer or agent starts a branch from that main commit, Squeal fetches those results automatically — any test file with identical inputs and a compatible environment is already current and does not need to run locally. Supports Vitest and node:test.
-
Pin one exact Node version
Add
.node-versionat the repository root (for example26.13.0). A shared result counts only on the Node version that recorded it; Squeal’s local daemon uses the pinned version when installed. -
Enable
shared.refinsqueal.config.jsonWithout
shared.ref, developers’ Squeal daemons fetch nothing:{"shared": {"ref": "refs/squeal","lookAgain": {"everySeconds": 30,"forSeconds": 600}}}If a developer checks out a brand-new
maincommit whose CI export is still finishing,lookAgainre-checks every 30 s for up to 10 min and imports results as soon as they appear (set"forSeconds": 0to check only once). -
Record and publish in GitHub Actions
name: Testson:push:branches: [main]pull_request:permissions:contents: readjobs:test:runs-on: ubuntu-24.04strategy:matrix:shard: [1, 2, 3]steps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version-file: .node-version- run: pnpm install --frozen-lockfile- uses: hearsay-tools/squeal/ci@v0- run: squeal ci record --out "$RUNNER_TEMP/squeal-parts" -- pnpm exec vitest run --shard=${{ matrix.shard }}/3- uses: actions/upload-artifact@v4if: github.event_name == 'push'with:name: squeal-parts-${{ matrix.shard }}path: ${{ runner.temp }}/squeal-parts/retention-days: 3node-test:runs-on: ubuntu-24.04steps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version-file: .node-version- run: pnpm install --frozen-lockfile- uses: hearsay-tools/squeal/ci@v0- run: >-squeal ci record --out "$RUNNER_TEMP/squeal-parts" --node --test--test-reporter=spec --test-reporter-destination=stdout--test-reporter="$SQUEAL_NODE_TEST_REPORTER" --test-reporter-destination=stderrtest/*.test.mjs- uses: actions/upload-artifact@v4if: github.event_name == 'push'with:name: squeal-parts-node-testpath: ${{ runner.temp }}/squeal-parts/retention-days: 3squeal-export:needs: [test, node-test]if: github.event_name == 'push'runs-on: ubuntu-24.04permissions:contents: writesteps:- uses: actions/checkout@v4with:fetch-depth: 0- uses: actions/setup-node@v4with:node-version-file: .node-version- run: pnpm install --frozen-lockfile- uses: hearsay-tools/squeal/ci@v0- uses: actions/download-artifact@v4with:pattern: squeal-parts-*path: ${{ runner.temp }}/squeal-partsmerge-multiple: true- run: squeal ci export --parts "$RUNNER_TEMP/squeal-parts" --out "$RUNNER_TEMP/squeal-results.json.gz"- run: squeal ci publish "$RUNNER_TEMP/squeal-results.json.gz" --keep 100
Production hardening tips
Section titled “Production hardening tips”- Token isolation: Split
squeal-exportinto two jobs so dependency install scripts never run withcontents: write. Job 1 (contents: read) installs dependencies, runssqueal ci export, and uploadssqueal-results.json.gz. Job 2 (contents: write) downloads that artifact and runs onlysqueal ci publish(nonpm/pnpm install). - Merge queues: Trigger part uploads and export on
merge_groupinstead ofpush, checking outgithub.event.merge_group.head_sha. Making export a required check ensuresrefs/squeal/<commit>is published beforemainmoves, preventing local runs from starting before CI results arrive. - Pinning the action:
hearsay-tools/squeal/ci@v0follows compatible releases automatically. To pin an exact commit SHA, usehearsay-tools/squeal/ci@<sha> # v0(compatible with Renovatehelpers:pinGitHubActionDigestsand Dependabot viav<version>tags).