Skip to content

Commit 892c320

Browse files
ci: gate on nix flake check (first CI for this repo)
pty-relay had no CI. Rather than a bespoke Node workflow — awkward while `@compoundingtech/pty` is a `file:../pty` link dependency with no sibling checkout on the runner — the flake is the gate: its inputs resolve the sibling from the `pty` flake. Modeled on compoundingtech/pty's .github/workflows/nix.yml, but running `nix flake check` rather than `nix build` so checks.* actually gate. Also adds checks.typecheck, running the repo's own `tsc --noEmit` against the built tree (where the sibling resolves; it cannot pass against a bare checkout). The vitest suite is deliberately not gated: under the nix sandbox test/daemon-runtime.test.ts hangs indefinitely at 0/14 and blocks two more files, while the other 69/72 pass. The same suite is fully green against the built tree outside the sandbox. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T1xLDkqUDCYUMMADdMqVgP agent-session-id: 312caff5-3274-4d97-baa4-8ff06ab03fc5 agent-tool: Claude Code agent-tool-version: 2.1.215 agent-model: claude-opus-4-8 agent-runtime-profile: /nix/store/acr8a3l2v366jgmwiq8xdrhgz1py0db5-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/sj1v5j91h8v8d1w9lca4040302lwrd6v-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@unknown-dirty
1 parent c8c197e commit 892c320

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/nix.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Nix
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 20
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: DeterminateSystems/determinate-nix-action@v3
14+
# `nix flake check` rather than `nix build`, so the checks.* gate too.
15+
- run: nix flake check --print-build-logs

flake.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,25 @@
109109
};
110110

111111
checks = {
112+
# The repo's own `tsc --noEmit`. It only passes once
113+
# @compoundingtech/pty resolves, which is exactly what the built
114+
# output provides — so run it against that rather than the raw src.
115+
typecheck = pkgs.runCommand "pty-relay-typecheck" { } ''
116+
export HOME=$(mktemp -d)
117+
cp -r ${pty-relay}/lib/pty-relay tree
118+
chmod -R u+w tree
119+
cd tree
120+
${nodejs}/bin/node node_modules/typescript/bin/tsc --noEmit
121+
touch $out
122+
'';
123+
124+
# NOTE: the vitest suite is deliberately NOT a check. It runs
125+
# green against this same built tree outside the sandbox, but under
126+
# the nix sandbox test/daemon-runtime.test.ts hangs indefinitely
127+
# (0/14, blocking session-list-view and terminal); the other 69/72
128+
# files pass. Gating `npm test` needs that file made sandbox-safe
129+
# first, so CI covers typecheck + the CLI smoke checks only.
130+
112131
help = pkgs.runCommand "pty-relay-help" { } ''
113132
export HOME=$(mktemp -d)
114133
${pty-relay}/bin/pty-relay --help > /dev/null

0 commit comments

Comments
 (0)