ci: add GitHub Actions workflow for typecheck, build, and tests - #41
Open
slegarraga wants to merge 1 commit into
Open
ci: add GitHub Actions workflow for typecheck, build, and tests#41slegarraga wants to merge 1 commit into
slegarraga wants to merge 1 commit into
Conversation
Runs npm ci, tsc -b, npm run build, and npm run --if-present test on pushes to main and every PR, across Node 20 and 22, with npm caching and a concurrency group that cancels superseded runs. Closes zanni098#19
|
@slegarraga is attempting to deploy a commit to the zanni098's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Workflow looks right — green on this PR, and it's the CI setup we want. One change before merge: Drop Node 20 from the matrix (keep 22, optionally add 24). Once #39 lands with jsdom 30 / jest-dom 7, those need a newer Node — this PR's green runs predate that bump, so they don't prove Node 20 compatibility once both merge. If 20 stays in the matrix, main goes red as soon as both are in. Ping me when that's pushed and I'll merge. |
3 tasks
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.
CI: GitHub Actions workflow (typecheck + build + tests)
Closes #19.
What
A single
ci.ymlworkflow that runs on pushes tomainand on every PR, across a Node 20 and 22 matrix:npm cinpx tsc -bnpm run build(which itself runstsc -b && vite build)npm run --if-present testPlus two small quality-of-life details: npm caching via
actions/setup-node, and a concurrency group (${{ github.workflow }}-${{ github.ref }}, cancel-in-progress) so pushing a new commit to an open PR cancels its superseded run instead of queueing both.Why the test step uses
--if-presentThere is no
testscript onmainyet; #39 adds Vitest with"test": "vitest run". With this flag the job is fully green onmaintoday (the step skips), and the moment #39 merges the same workflow picks up the suite with zero coordination or edits needed. I verified both sides of that bridge locally:main:npm run --if-present testexits 0 and skips.Validation
All executed locally against this exact tree before opening the PR:
cijob).npx tsc -b: no errors found.npm run build: succeeds, bundle emitted (280 kB js / 90 kB gzip).npm run --if-present teston main: exit 0, skipped as designed.The first real Actions run will confirm the hosted path once this PR opens.