Repository navigation
feat(ci): CI checks + Workers deploy workflow - #25
Merged
Merged
Conversation
Job `ci` (typecheck + test + format:check) on pull_request and push to main — this is the check context the main-branch ruleset will require. Job `deploy` runs only on push to main after ci: wrangler d1 migrations apply --remote then wrangler deploy, authed via CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID secrets (direct pnpm exec wrangler — same pinned wrangler as local dev; Cloudflare documents this alongside the action). Corrects the token guidance: the 'Edit Cloudflare Workers' template does NOT include D1 Write — add D1 Write, scoped to the account.
Node 24.19.0 backported ObjectWrap cleanup hooks without the registry follow-up (nodejs/node#65446): any addon compiled against 24.19+ headers aborts at Statement::~Statement during teardown. better-sqlite3 11.10.0 ships no Node 24 prebuild, so CI compiled it from source against 24.21 headers and crashed; local 24.16.0 passed. 13.x is the N-API rewrite (WiseLibs/better-sqlite3#1498): the node::ObjectWrap destructor path is gone, prebuilds are bundled (no node-gyp on CI), and our API surface (Database/prepare/run/get/all/exec/pragma/transaction/close) is unchanged. Node >= 22 required — .nvmrc stays 24.
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.
Lane D of the deploy plan (ADR-0002/0003/0004).
.github/workflows/ci.yml— jobci: pnpm (frompackageManager) + Node 24 (from.nvmrc) +pnpm install --frozen-lockfile, thentypecheck/test(139) /format:check, onpull_requestandpushto main. This job name is the check context the upcoming main-branch ruleset will require.deploy: only on push to main,needs: ci:pnpm exec wrangler d1 migrations apply ytb-index --remotethenpnpm exec wrangler deploy, authed with theCLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_IDsecrets (env vars are wrangler's documented CI auth). Direct invocation instead ofcloudflare/wrangler-action: same pinned wrangler 4.147.0 as local dev, fewer moving parts (Cloudflare documents both)..env.example: corrected token guidance — the "Edit Cloudflare Workers" template does not include D1 Write; it must be added (scoped to the account) for migrations apply and remote ingest.Required before merging: the
CLOUDFLARE_API_TOKENsecret must be re-created/edited to add D1 Write (Account, scoped to the one account) — otherwise the deploy job's migrations step fails 403.