ci(frontend): 提高前端流水线及端到端测试稳定性
前端验证 / verify (push) Failing after 15m3s

- 使用内部 checkout 镜像,并校验运行环境中的 Node.js 22
- 检测预览服务端口冲突并重试,避免并行测试误连其他进程
- 调整布局测试的视口宽度和溢出断言,兼容经典滚动条
- 增加时钟暂停的时间余量,避免 CI 调度延迟导致测试失败
This commit is contained in:
cneicy committed 2026-11-06 20:24:56 +08:00
1 parent 6041d717f7
commit 5d080cacec
4 files changed
+69 -48

No files matched your search

+8 -6
View File
@@ -10,14 +10,16 @@ jobs:
timeout-minutes: 15
steps:
- name: 获取源码
uses: https://github.com/actions/checkout@v4
# Runner 所在网络访问 github.com 不稳定;使用 git.crash.work 上的副本(手动从 GitHub 推送更新)。
uses: https://git.crash.work/actions/checkout@v4
with:
persist-credentials: false
- name: 准备 Node.js
uses: https://github.com/actions/setup-node@v4
with:
node-version: "22"
cache: npm
# Runner 位于中国大陆,ubuntu-latest 映射到自带 Node 22 的 node:22-bookworm-slim 镜像;
# 不再用 setup-node 从 GitHub 下载 Node(经常超时),只校验镜像内版本。
- name: 确认 Node.js
run: |
node -v
node -e 'if (Number(process.versions.node.split(".")[0]) !== 22) { console.error("需要 Node 22"); process.exit(1) }'
- name: 安装锁定依赖
run: npm ci
- name: 安装测试浏览器