Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

ci: add a vitest gate (full npm test) alongside the nix flake check - #100

Merged
myobie merged 1 commit into
mainfrom
convoy-ci-vitest-gate
Jul 21, 2026
Merged

ci: add a vitest gate (full npm test) alongside the nix flake check#100
myobie merged 1 commit into
mainfrom
convoy-ci-vitest-gate

Conversation

@myobie

@myobie myobie commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a vitest CI gate — a Test workflow that runs the full npm test (vitest) on PRs + push-to-main, closing the gap you flagged: convoy CI ran only nix flake check (build + help/completions/typecheck + the completions-parity test), never the full vitest suite. So a red vitest test could ship green. (The gap pty closed in #114.)

Why a separate workflow, not a flake check

Most of convoy's vitest suite shells out to git worktree and spawns the real bin/convoy — awkward in the hermetic nix sandbox, which is why only the pure completions-parity test lives in the flake today. A normal runner handles the shell-outs cleanly. nix.yml stays as-is; this runs alongside it.

The convoy-specific wrinkle (vs pty's #114)

convoy depends on @compoundingtech/pty + @compoundingtech/smalltalk via file:../<sibling> paths (the flake links them from flake inputs). So the workflow:

  • checks out pty + smalltalk beside convoy and builds them — convoy imports their compiled dist/;
  • installs zsh + fish so the generated-completion syntax checks actually run instead of skipping — this is exactly what would have caught the zsh apostrophe bug from convoy eval: batch-job type + completion event + orchestrator → machine verdict (Phase 1) #96 locally;
  • uses npm install (not npm ci) for convoy — the sibling repos float ahead of convoy's pinned lockfile, so npm ci would break on any sibling version bump;
  • sets a git identity (the cutWorktree tests git commit in throwaway repos);
  • Node 24 (convoy needs ≥23.6 for bin/convoy's .ts type-stripping at load; matches the flake's nodejs_24).

The workflow validates itself on this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS

convoy CI ran only `nix flake check` — build + help/completions/typecheck +
the completions-parity test, but NOT the full vitest suite (most of it shells
out to `git worktree` / spawns bin/convoy, awkward in the hermetic nix sandbox).
That left a gap: a red vitest test could ship green.

Adds a Test workflow that runs `npm test` on a normal runner, gated on PRs +
push-to-main. Modeled on pty's #114 test.yml, adapted for convoy's one real
difference — the file:../ sibling deps (@compoundingtech/pty + smalltalk): the
siblings are checked out beside convoy and built (convoy imports their dist/),
zsh + fish are installed so the completion syntax checks actually run (rather
than skip), then `npm install` links the siblings and `npm test` runs the suite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS
@myobie
myobie merged commit 350b70d into main Jul 21, 2026
2 checks passed
@myobie
myobie deleted the convoy-ci-vitest-gate branch July 21, 2026 11:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant