chore(ci): add PR workflow for build, typecheck, format & test - #1797
Merged
Conversation
Adds a GitHub Actions workflow that runs on pull_request and push to main. The workflow runs the full validation pipeline: 1. format:check (oxfmt --check) 2. typecheck (tsgo --noEmit) 3. build (tsdown via turbo) 4. test (vitest) Steps run sequentially within a single job so later steps fail fast on earlier errors. In-progress runs on the same PR are cancelled when new commits are pushed. Also adds: - `format:check` script to root and both packages - `format:check` turbo task Node 22 is used (required by tsdown >= 22.18) with pnpm 8.7.0 to match the packageManager field. Dependencies are installed with --frozen-lockfile to catch lockfile drift.
mihar-22
marked this pull request as ready for review
May 25, 2026 04:14
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.
Summary
Adds a GitHub Actions workflow that runs on every pull request and push to
main. Validates the full pipeline:oxfmt --checkacross both packagestsgo --noEmitagainsttsconfig.jsonin each packagetsdownJS bundles + tsgo-generated bundled.d.tsdeclarations via turbovitest --runWorkflow design
pull_requesttomain+pushtomain(so the main branch is also continuously validated)packageManagerfieldpnpm install --frozen-lockfileto catch lockfile driftAdditional changes
format:checkscript to root (turbo run format:check --parallel) and both packages (oxfmt --check src)format:checkturbo task with the same inputs asformatWhy not put format/typecheck in separate jobs?
The full pipeline runs in ~25 seconds locally, which is fast enough that the overhead of duplicate
pnpm install(~30-60s) across parallel jobs would actually be slower. A single job that fails fast is the right tradeoff here.Local verification
pnpm format:checkpnpm typecheckpnpm buildpnpm test🤖 Generated with opencode