Skip to content

ci: e2e 套件接入 GitHub Actions - #4

Merged
aumarsdu merged 1 commit into
mainfrom
codex/e2e-ci-20261023
Oct 27, 2026
Merged

aumarsdu merged 1 commit into
mainfrom
codex/e2e-ci-20261023

Conversation

@aumarsdu

Copy link
Copy Markdown
Owner

内容

将已有的 model-free e2e 套件(23 例,覆盖首页 / GPA / 成本 / 时间线全部用户流)接入 GitHub Actions CI。

套件现状

  • 23 个测试用例,本地全绿;e2e.config.ts 由 runner 自行启动 Vite dev server(127.0.0.1:4320,strictPort),无需单独构建步骤。
  • 套件模型无关(不依赖任何 LLM provider),tests/helpers.ts 会中断一切外部请求 —— 断言零外呼,CI 无需任何 secret。

Workflow 设计要点

  • 触发:pull_request + push 到 main + workflow_dispatch;ubuntu-latest,timeout-minutes: 20,最小权限 contents: read。
  • 步骤:checkout@v4 → setup-node@v4(Node 24,npm 缓存)→ npm ci(lockfile 已验证可用)→ 显式安装 chromium 浏览器 → E2E_TELEMETRY_DISABLED=1 npx e2e run → 失败时上传 .e2e/results/ 工件(upload-artifact@v4,if-no-files-found: ignore,保留 14 天)。
  • 为什么显式安装浏览器:e2e runner 的 chromium 不会随 npm ci 自动就位,缺失浏览器安装正是此前 release-quality workflow 连红两个月的原因,此步骤不可省略。
  • 一处有意偏差:安装命令用 npx playwright-core install --with-deps chromium 而非 npx playwright install ...。仓库只传递依赖了 playwright-core 1.64.0(@e2e-dev/web 的实际驱动),npx playwright 会临时拉取无关的最新 playwright 包,存在浏览器 build 与驱动版本不匹配的风险;playwright-core install 与本地 dry-run 验证的 chromium v1248 完全一致。
  • 不改动既有 deploy-helipei-official-oss.yml。

验证

PR 创建后会在本分支跑一次真实 CI run,合并前以绿跑为准。

- 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 天)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T13:29:29.401543Z cab7860 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/e2e.yml
Comment on lines +45 to +46
path: .e2e/results/
if-no-files-found: ignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@aumarsdu
aumarsdu merged commit 1fa0aca into main Oct 27, 2026
1 check passed
@aumarsdu
aumarsdu deleted the codex/e2e-ci-20261023 branch October 27, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant