Skip to content

ci: run typecheck, build and the test suite on pull requests - #2861

Closed
LuisAlbertoMK wants to merge 1 commit into
colbymchenry:mainfrom
LuisAlbertoMK:ci/github-actions
Closed

LuisAlbertoMK wants to merge 1 commit into
colbymchenry:mainfrom
LuisAlbertoMK:ci/github-actions

Conversation

@LuisAlbertoMK

Copy link
Copy Markdown

No workflow runs the suite today, so a change is green only on the machine that wrote it. This adds the three steps a contributor runs by hand:

  • npx tsc --noEmit
  • npm run build — the CLI and both vitest projects read from dist/, and build also asserts the viewer bundle and the 29 copied grammars
  • npx vitest run --project engine --project ui — explicit, so the log names the project that failed instead of hiding a viewer regression inside an engine failure

Choices, all easy to change

  • pull_request + workflow_dispatch, no push to main: it spends no runner time on merges, and a release is triggered by hand anyway. Adding push: branches: [main] is one line if you want post-merge coverage.
  • Node 22, the floor the bundled runtime ships and the first line with node:sqlite, which the database layer requires. A 20/24 matrix is possible but roughly triples the run for coverage the suite does not currently vary on.
  • Ubuntu only. The suite already has Windows-gated tests; a Windows matrix over ~700 files is slow and flaky. Linux is the platform the packaged runtime is least exercised on.
  • cache: npm relies on the committed lockfile.
  • The artifact upload on failure is there because a build failure can come from the viewer bundle or a missing grammar, not only from TypeScript, and dist/ is what says which.

Signal

These three steps already ran green on a Linux runner over a tree containing upstream/main at 428b3c48 — typecheck, build, full suite, 11m12s. So this lands with a known-good result rather than a red first run.

Happy to trim any of it, or split the workflow from the artifact step if you would rather review them separately.

@LuisAlbertoMK

Copy link
Copy Markdown
Author

Closing this. #267 already settled it — a checked-in CI workflow is a maintainer call, and the answer was no. I should have read that before opening; sorry for the noise.

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