Skip to content

ci: add minimal workflow for typecheck and library build#72

Merged
aka-blackboots merged 4 commits into
mainfrom
chore/add-ci-workflow
May 5, 2026
Merged

ci: add minimal workflow for typecheck and library build#72
aka-blackboots merged 4 commits into
mainfrom
chore/add-ci-workflow

Conversation

@aka-blackboots
Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/ci.yaml that runs on every pull request and on push to main:

  • npx tsc --noEmit
  • npm run build (rollup library bundle)

Node 20 LTS, npm cache enabled, in-flight runs are cancelled when a new commit lands on the same ref.

Why

Without CI, every PR ships unverified. This is the safety gate that lets future work — including parallel cleanup PRs — be auto-validated before merge.

What's deliberately NOT in CI yet

npm run build-examples. examples/src/demo.html imports modules that don't currently exist in the repo (it's broken on main and was already broken before this PR). A comment in the workflow file points to where to re-enable the step once that is fixed.

Test plan

  • After merge, this PR's own CI run on the merge commit goes green
  • Open a trivial follow-up PR (e.g. README typo) to confirm the workflow runs on pull_request
  • Confirm GitHub shows the check on the PR page

Notes

  • This is one of the Phase 0 PRs in our debt-clearance plan. After this lands, the next item is ESLint + Prettier config.

🤖 Generated with Claude Code

aka-blackboots and others added 4 commits May 4, 2026 07:52
Adds .github/workflows/ci.yaml that runs on every pull_request and on
push to main:
- npx tsc --noEmit
- npm run build (rollup library bundle)

Node 20 LTS, npm cache enabled, in-flight runs cancelled when a new
commit lands on the same ref.

`npm run build-examples` is intentionally NOT run yet — examples/src/
demo.html has a pre-existing broken import that is tracked separately.
A comment in the workflow points to where to re-enable the step once
that is fixed.

This is the safety gate that lets future PRs be auto-validated before
merge.
CI failed because npx tsc could not resolve the compiler — typescript
was only present transitively (via @rollup/plugin-typescript), and
the bin was not reliably linked on a fresh runner.

Adds typescript ^6.0.3 to devDependencies (matches the version
already resolved in package-lock.json) so npx tsc and tsc --noEmit
work in any clean checkout, including CI.
Adds a "typecheck" npm script and switches the CI workflow to call
`npm run typecheck` rather than `npx tsc --noEmit`.

Why: on a fresh CI runner, `npx tsc` was hitting the registry's `tsc`
stub package ("This is not the tsc command you are looking for")
instead of the local install — even with typescript declared as a
devDependency. `npm run typecheck` reliably resolves the local
node_modules/.bin/tsc.
Keep typecheck script and typescript devDep from this branch;
merge in lint/format scripts and typescript-eslint from main.
Regenerate package-lock.json cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aka-blackboots aka-blackboots merged commit 1c5eed5 into main May 5, 2026
1 check failed
@bhairaav bhairaav deleted the chore/add-ci-workflow branch May 5, 2026 17:29
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