fix: make PTY removal generation-safe #17
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: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| vitest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| # Match flake.nix (nodejs_22) so the CI test runtime tracks the | |
| # Nix-built runtime and versions don't skew. | |
| node-version: 22 | |
| cache: npm | |
| - name: Install test-only binaries (absent on ubuntu-latest) | |
| # shells.test.ts exercises real zsh/fish shell integration; and | |
| # restart-guardrail spawns a `claude --resume` session — its guard keys | |
| # purely on the stored argv, so a no-op stub named `claude` is enough to | |
| # create the session under test. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y zsh fish | |
| printf '#!/bin/sh\nexec sleep 300\n' | sudo tee /usr/local/bin/claude >/dev/null | |
| sudo chmod +x /usr/local/bin/claude | |
| - run: npm ci | |
| # The vitest suite exercises the compiled CLI/daemon (dist/cli.js, | |
| # dist/server.js), so build before running the tests. | |
| - run: npm run build | |
| - run: npm test |