Files
console-dev/.gitea/workflows/frontend.yml
T
cneicy 6041d717f7
前端验证 / verify (push) Failing after 15m2s
fix: 修复首页用户 ID 复制按钮换行问题
- 禁止用户 ID 在按钮内拆行,确保长用户名场景下按钮整体换行
- 添加 Chromium 和 Firefox 在不同视口宽度下的布局回归测试
- 更新 CI 浏览器安装配置及测试文档
- 忽略包含生产服务器结构信息的本地运维技能目录
2026-11-06 19:40:42 +08:00

36 lines
1.2 KiB
YAML

# 仅做前端验证,不包含发布、服务器登录或生产凭证。
name: 前端验证
on:
push:
pull_request:
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 获取源码
uses: https://github.com/actions/checkout@v4
with:
persist-credentials: false
- name: 准备 Node.js
uses: https://github.com/actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: 安装锁定依赖
run: npm ci
- name: 安装测试浏览器
run: npx playwright install --with-deps chromium firefox
- name: 检查源码并构建
run: |
npm run check
npm run build
- name: 验收真实生产构建
run: |
task_chrome_path="$(node --input-type=module -e 'import { chromium } from "playwright"; process.stdout.write(chromium.executablePath())')"
CHROME_PATH="$task_chrome_path" npm test
# deepmerge 尚无上游修复版本;低危传播项保留在审计输出,不通过降级框架隐藏。
- name: 阻止中危及以上依赖风险
run: npm audit --audit-level=moderate