ci: 统一测试入口 scripts/ci.mjs(协议/用户管理/单测/双设备/实时链路/构建/依赖审计)+ Gitea Actions 工作流
CI / 测试套件(协议/用户管理/单测/双设备/实时链路/构建) (push) Failing after 30s
CI / 依赖漏洞扫描(软性检查) (push) Failing after 30s

This commit is contained in:
root
2026-10-16 21:03:54 +08:00
parent 3505e10961
commit 9a91c4c85d
46 changed files with 8505 additions and 1 deletions
+51
View File
@@ -0,0 +1,51 @@
# CI:每次推送自动运行完整测试套件(本地与云端同一入口:node scripts/ci.mjs)
# 首次启用需要在 Gitea 服务器上:
# 1) 管理后台开启 Actions
# 2) 部署 act_runner(docker compose 服务,见 server/DEPLOY.md)
name: CI
on:
push:
pull_request:
jobs:
test:
name: 测试套件(协议/用户管理/单测/双设备/实时链路/构建)
runs-on: ubuntu-latest
container:
image: node:22-bookworm
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装 pnpm
run: npm install -g pnpm@11
- name: 安装依赖
working-directory: intern-log
run: pnpm install --frozen-lockfile
- name: 运行测试与构建
env:
NODE_ENV: production
run: node scripts/ci.mjs
audit:
name: 依赖漏洞扫描(软性检查)
runs-on: ubuntu-latest
container:
image: node:22-bookworm
continue-on-error: true
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装 pnpm
run: npm install -g pnpm@11
- name: 安装依赖
working-directory: intern-log
run: pnpm install --frozen-lockfile
- name: pnpm audit(高危及以上)
working-directory: intern-log
run: pnpm audit --prod --audit-level=high