CI: run typecheck, lint & Vitest suites on pull requests#47
Open
nojibe wants to merge 1 commit into
Open
Conversation
Add a CI workflow that runs the quality gates on pull requests and on pushes to main. Separate jobs (typecheck, lint, test-web, test-cli) run in parallel so failures are isolated, each performing the common setup (checkout, pnpm, Node from .nvmrc, frozen install) then its one command. The lint job is guarded: the repo currently ships no ESLint config, so `next lint` would prompt interactively and hang CI. When no config is present the job emits a warning and passes instead of hanging; it lints normally once an ESLint config and deps are added. Closes #33 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9z5V7UM3FhqomggQ3XTVG
Contributor
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.
Closes #33
Stacking
This PR is stacked on #46 (the Jest→Vitest migration, issue #45), so its base is
claude/vitest-migration-45and the diff is limited to the single new workflow file. Once #46 merges, GitHub will automatically retarget this PR tomain.Summary
Adds
.github/workflows/ci.yml— a CI workflow that runs the project's quality gates on pull requests and on pushes tomain.pull_requestandpushtomain, both withpaths-ignorefor**/*.mdanddocs/**(mirrorse2e.yml).github.refwithcancel-in-progress: true.pnpm/action-setup@v4→actions/setup-node@v4withnode-version-file: '.nvmrc'(Node 18) andcache: pnpm→pnpm install --frozen-lockfile.typecheck→pnpm typechecklint→pnpm lint(guarded; see caveat)test-web→pnpm test:webtest-cli→pnpm test:cliVerified locally (on this branch)
package.json.pnpm typecheck→ passes (exit 0).pnpm test:web→ 49 files, 596 passed / 1 skipped.pnpm test:cli→ 45 files, 519 passed / 1 skipped.Lint caveat
The repo currently ships no ESLint config (
.eslintrc*/eslint.config.*) and noeslint/eslint-config-nextdevDependencies. As a resultnext lintprompts interactively ("How would you like to configure ESLint?") and would hang CI — confirmed locally even with stdin closed.To avoid hanging CI or failing every PR over a pre-existing gap that is out of scope for this ticket, the
lintjob is guarded: it runspnpm lintonly when an ESLint config is present, otherwise it emits a GitHub warning annotation and passes. The other three gates are unaffected and fully enforced. Once an ESLint config and the corresponding devDependencies are added (best tracked as a separate follow-up), the guard becomes a no-op and lint runs normally.🤖 Generated with Claude Code
https://claude.ai/code/session_01T9z5V7UM3FhqomggQ3XTVG
Generated by Claude Code