Skip to content

test(desktop): run the desktop test suite in CI - #297

Merged
quickbeard merged 1 commit into
mainfrom
desktop-test-ci
Aug 22, 2026
Merged

quickbeard merged 1 commit into
mainfrom
desktop-test-ci

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

What

packages/desktop ships 21 test files — updater controller, window registry, store writer, WSL install bundle, sandbox workspace/gateway-models, attachment picker, and more — and none of them have ever run in CI. The package has no test script, so bun turbo test in test.yml skipped it outright: 126 passing tests gating nothing.

  • packages/desktop/package.json: add "test": "bun test src --only-failures". Scoped to src (matching @opencode-ai/ui) so the built out/ tree is never scanned.
  • turbo.json: register @opencode-ai/desktop#test. CI only runs test tasks declared here, so the script alone would not have enrolled the package. No ^build dependency — the workspace packages the tests import (@codev/sandbox, @codev/gateway, @opencode-ai/app types) all export TypeScript source, same as the existing @codev/sandbox#test entry.
  • DIVERGENCES.md: a row for the new package.json script, and the existing turbo.json row extended to cover both fork-added tasks.

Verification

  • bun run test from packages/desktop: 126 pass / 0 fail across 21 files (~0.4s).
  • bun turbo test --filter=@opencode-ai/desktop: 1 successful.
  • bun turbo test --dry=json now lists @opencode-ai/desktop#test in the full graph.

The unit job is a linux + windows matrix, so these tests will now also run on Windows. They are written host-agnostically — the platform-shaped cases (sandbox/workspace.test.ts, wsl/*) pass platform explicitly and use tmpdir()/join for real filesystem work, and the rest are pure string/logic tests. That said, this PR's own CI run on windows-latest is the first actual evidence.

The package shipped 21 test files and no `test` script, so `bun turbo test`
skipped it entirely: 126 passing tests that gated nothing.

Add the script (scoped to `src`, like `@opencode-ai/ui`, so the built `out/`
tree is never scanned) and register the matching turbo task — CI only runs
test tasks declared in turbo.json, so the script alone would not have been
enough. No `^build` dependency: the workspace packages the tests import
(`@codev/sandbox`, `@codev/gateway`, `@opencode-ai/app` types) all export
TypeScript source.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit fc46577 into main Aug 22, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the desktop-test-ci branch August 22, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant