Skip to content

ci: build, typecheck and test the extension - #333

Merged
vineethkrishnan merged 1 commit into
mainfrom
ci/extension-build-and-test
Jul 29, 2026
Merged

ci: build, typecheck and test the extension#333
vineethkrishnan merged 1 commit into
mainfrom
ci/extension-build-and-test

Conversation

@vineethkrishnan

Copy link
Copy Markdown
Owner

The gap

No workflow touched the extension/ package at all. ci.yml ran npm ci && npm run build in web only, and grepping every workflow for "extension" returned nothing. Every green check on an extension-only PR was vacuous, because CI never compiled a line of it.

This is not theoretical:

The job

Installs the extension, typechecks it, runs its vitest suite, and builds both the chrome and firefox targets. Any break in those now surfaces as a red check.

Why there is no npm ci in web/

mobile.yml needs an extra install in web/ because mobile/tsconfig.json maps @vaultctl/shared/* into web/src/shared/, and TypeScript resolves those files' own imports from their own location. The extension's tsconfig has the same shape, so this looked like the same trap.

It isn't. The only non-relative import those shared files carry is hash-wasm, and the extension's tsconfig maps that to its own node_modules. I verified this rather than assuming it: the entire job runs green from a clean git worktree checkout with no web/node_modules present anywhere. Adding the install would only cost CI time.

Verification

Every step was run from that clean checkout before writing the job:

npm ci          ok
npm run typecheck   ok
npm test        7 files, 74 tests passed
npm run build       ok (chrome-mv3)
npm run build:firefox   ok (firefox-mv3)

actionlint clean.

No workflow touched the extension package at all. ci.yml ran npm ci and npm run build in web only, and grepping every workflow for "extension" returned nothing, so every green check on an extension-only PR was vacuous: CI never compiled a line of it. That is not theoretical. Dependabot's TypeScript 7 bump for the extension showed all seven checks green while npm run typecheck fails outright against it, and the two extension changes merged earlier today were reported green by checks that never built them.

The new job installs the extension, typechecks it, runs its vitest suite, and builds both the chrome and firefox targets, so a break in any of those now shows up as a red check.

Unlike mobile.yml there is deliberately no npm ci in web/. The extension's tsconfig does compile files out of web/src/shared/, which is the setup that forced the extra install for mobile, but the only non-relative import those files carry is hash-wasm, and the same tsconfig maps that to the extension's own node_modules. Verified by running the whole job from a clean checkout with no web/node_modules present: it passes, so the extra install would only cost time.
@vineethkrishnan
vineethkrishnan merged commit 94bf3ac into main Jul 29, 2026
8 checks passed
@vineethkrishnan
vineethkrishnan deleted the ci/extension-build-and-test branch July 29, 2026 10:54
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