Repository navigation
ci: e2e 套件接入 GitHub Actions - #4
Conversation
- pull_request / push main / workflow_dispatch 三种触发,timeout 20 分钟,最小权限 contents:read - npm ci 后显式安装 chromium(playwright-core 版本锁定,避免浏览器 build 漂移) - E2E_TELEMETRY_DISABLED=1 跑 model-free 套件(无 secret、网络隔离) - 失败时上传 .e2e/results/ 工件(保留 14 天)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cab7860fde
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| path: .e2e/results/ | ||
| if-no-files-found: ignore |
There was a problem hiding this comment.
Enable hidden files when uploading e2e results
When the suite fails and writes results, this upload step excludes them because they are inside the hidden .e2e directory. The upload-artifact v4 documentation defines hidden files to include files within dot-prefixed directories and requires include-hidden-files: true to upload them. With if-no-files-found: ignore, the step silently produces no diagnostic artifact. Enable hidden-file inclusion for this narrowly scoped results path.
Useful? React with 👍 / 👎.
内容
将已有的 model-free e2e 套件(23 例,覆盖首页 / GPA / 成本 / 时间线全部用户流)接入 GitHub Actions CI。
套件现状
e2e.config.ts由 runner 自行启动 Vite dev server(127.0.0.1:4320,strictPort),无需单独构建步骤。tests/helpers.ts会中断一切外部请求 —— 断言零外呼,CI 无需任何 secret。Workflow 设计要点
pull_request+push到main+workflow_dispatch;ubuntu-latest,timeout-minutes: 20,最小权限contents: read。npm ci(lockfile 已验证可用)→ 显式安装 chromium 浏览器 →E2E_TELEMETRY_DISABLED=1 npx e2e run→ 失败时上传.e2e/results/工件(upload-artifact@v4,if-no-files-found: ignore,保留 14 天)。npm ci自动就位,缺失浏览器安装正是此前 release-quality workflow 连红两个月的原因,此步骤不可省略。npx playwright-core install --with-deps chromium而非npx playwright install ...。仓库只传递依赖了playwright-core1.64.0(@e2e-dev/web的实际驱动),npx playwright会临时拉取无关的最新 playwright 包,存在浏览器 build 与驱动版本不匹配的风险;playwright-core install与本地 dry-run 验证的 chromium v1248 完全一致。deploy-helipei-official-oss.yml。验证
PR 创建后会在本分支跑一次真实 CI run,合并前以绿跑为准。