fix(ci): 修复全新检出 Lint 失败并恢复 main 自动触发
背景:run #37 在 runner 上失败于 Lint,日志报 @lingxi/* 下发类型无法解析—— workspace 包 types 指向 dist/,而 dist/ 被 gitignore,全新检出未构建导致 类型感知规则失效;另 postgres 健康检查 -U lingxi 与 POSTGRES_USER=postgres 不一致。 改动: - ci.yml:Lint 前新增 packages 构建步骤;健康检查改为 pg_isready -U postgres; 恢复 push main 自动触发(保留 workflow_dispatch)。 - ci-local.mjs:同步补充 packages 构建步骤,避免全新检出本地 CI 同样失败。 影响面:仅 CI 配置与本地 CI 脚本,不改业务代码;push main 后自动跑完整门禁。 回滚方式:revert 本提交;如需临时停用远端 CI,注释 on.push。 验证证据:runner 冒烟 run #38 全绿(ci-smoke.yml,71s);本提交推送后由远端 ci.yml 完整链路验证。
This commit is contained in:
1 parent
81c0426d71
commit
88d9c77522
2 files changed
+16
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* 本地 CI:在无 Gitea Actions runner 时,按 .gitea/workflows/ci.yml 的门禁顺序执行。
|
||||
* 本地 CI:按 .gitea/workflows/ci.yml 的门禁顺序执行(推送前强制;远端 Gitea Actions 为第二道防线)。
|
||||
* 用法:pnpm ci:local(推荐通过 ./.tools/pnpm ci:local 锁定 pnpm 10)
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
@@ -19,6 +19,10 @@ const e2eEnv = {
|
||||
/** 每一步可包含多条 pnpm 命令,任一失败立即退出;env 为该步骤追加的环境变量。 */
|
||||
const steps = [
|
||||
{ label: '检查本地依赖(PG / Redis)', commands: [['check:dev']] },
|
||||
{
|
||||
label: '构建 workspace 包(Lint 类型解析前置)',
|
||||
commands: [['exec', 'turbo', 'run', 'build', '--filter=./packages/*']],
|
||||
},
|
||||
{ label: '格式化检查', commands: [['format:check']] },
|
||||
{ label: 'Lint', commands: [['lint']] },
|
||||
{ label: '类型检查', commands: [['typecheck']] },
|
||||
|
||||
Reference in new issue
Block a user