ci(actions): fix typecheck/build order + share webview artifact #161

Merged
KofTwentyTwo merged 1 commits from ci/fix-typecheck-and-spm-deps into develop 2026-05-13 11:55:50 +00:00
1 Commits
Author SHA1 Message Date
james.maesandClaude Opus 4.7 09f00dd238 ci(actions): fix typecheck/build order + share webview artifact across jobs
Three surgical fixes to .github/workflows/ci.yml that came out of the
first develop-push validation cycle after PR #154 landed:

1. Webview job: typecheck ran before build, so packages/hud's TS
   imports of `@jarvis/bus` failed with TS2307 "Cannot find module".
   Build must produce `packages/bus/dist/index.d.ts` before typecheck
   reads it. Reordered the steps and switched the build invocation to
   `bash scripts/build-webview.sh` so the production-stamped output
   lands at `App/Resources/webview/` (where SPM tests + xcodebuild
   both look for it).

2. swift-packages job: 6 packages (AgentCore / Bus / Harness / MCP /
   Voice / VoiceLog) failed with `Error: bus not mounted` because the
   BusTests + downstream test fixtures mount a real WKWebView that
   loads `App/Resources/webview/index.html`. CI didn't have that file.
   Added `needs: [webview]` + an `actions/download-artifact@v4` step
   that pulls the new `webview-resources` artifact to
   `App/Resources/webview/`.

3. app-build job: was running `bash scripts/build-webview.sh` inline
   (which needs pnpm + node setup, another 30-60s of runner time).
   Replaced with the same `download-artifact` step. The shared
   artifact is produced once in the webview job and consumed by both
   swift-packages and app-build.

The artifact name changed from `webview-dist` (raw `packages/hud/dist/`
contents) to `webview-resources` (the production-stamped
`App/Resources/webview/` tree). No external consumers existed for the
old artifact name (it was added in #154 in the same PR), so this is a
clean rename.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 06:55:19 -05:00