ci: 加入 GitHub Actions(typecheck + lint) - #1
Merged
Conversation
Runs the project's own pre-push gate (`npm run check` = tsc --noEmit + eslint) on every push/PR to main. Installs deps via `npm ci` and generates the Prisma client first so type information is available. Build and full-system tests are intentionally excluded — they require a Postgres DB plus several Telegram/LLM secrets and would make CI flaky. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
actions/checkout@v4 and setup-node@v4 target the deprecated Node 20 runner; @v5 runs on Node 24. Avoids a future hard failure when GitHub removes Node 20 from runners. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
目的
讓 GitHub 倉庫的 commit / PR 出現 CI 綠勾勾。目前 repo 沒有任何 GitHub Actions workflow。
內容
新增
.github/workflows/ci.yml,在 push / PR 到main時執行專案自身的 pre-push gate:npm ci— 依 lockfile 乾淨安裝npx prisma generate— 產生 Prisma client 型別(tsc需要)npm run check—tsc --noEmit && eslint設計取捨
.githooks/pre-push一致,已在本地驗證通過。next build與 full-system test:兩者需要 Postgres 及多個 Telegram/LLM secrets,放進 CI 會不穩定、容易變紅叉。日後若要可再加獨立 job。🤖 Generated with Claude Code