ci: build, typecheck and test the extension - #333
Merged
Conversation
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
No workflow touched the
extension/package at all.ci.ymlrannpm ci && npm run buildinwebonly, 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:
npm run typecheckfails outright against it. It was closed on the strength of a local run, not CI.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 ciin web/mobile.ymlneeds an extra install inweb/becausemobile/tsconfig.jsonmaps@vaultctl/shared/*intoweb/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 ownnode_modules. I verified this rather than assuming it: the entire job runs green from a cleangit worktreecheckout with noweb/node_modulespresent anywhere. Adding the install would only cost CI time.Verification
Every step was run from that clean checkout before writing the job:
actionlintclean.