ci: 加 build/typecheck/lint/test 校验,合并前拦住生产构建崩溃#45
Open
hikariming wants to merge 2 commits into
Open
Conversation
- 新增 .github/workflows/ci.yml:PR 与 push main 时跑全套检查。 - 修 CopyBadge 的 set-state-in-effect lint 报错(改用 useSyncExternalStore 读 origin),让 lint 步骤能纳入 CI 且全绿。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
处理下这个branch |
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.
背景
生产构建因
/sitemap.xml全表扫描查询超 60s 而崩溃(已在 main575589b紧急修复代码)。但没有 CI,这类「构建崩了」的回归只能等到部署才发现。改动
.github/workflows/ci.yml:在 PR 和 push 到 main 时跑typecheck → lint → test → build,合并前就能拦住绝大多数构建期回归。CopyBadge.tsx:修掉 main 上已存在的react-hooks/set-state-in-effectlint 报错(改用useSyncExternalStore读window.location.origin,行为不变),让 lint 步骤能纳入 CI 且全绿。说明 / 局限
getClient()秒返回空,未必能复现这一例。真正堵住这一类的是已合并的force-dynamic代码改动。本地验证
typecheck ✅ / lint ✅ / test 129 passed ✅ / build ✅
🤖 Generated with Claude Code