zizi 0658d178ad 工程底座:单一生成入口、验证期写闸门与并行分片
- Makefile:新增 验收数据库(生成→检查→库层全量,前置校验隔离库连接串)、数据库分片、浏览器测试三个入口;
  格式写入 末尾就地重新生成;数据库测试 与 验收数据库 统一排除 浏览器/网络;快检 不再静默跳过类型门;
  前端旅程 预检补齐四个必需变量;pytest 目标改用仓内解释器(uv run 在嵌套检出会解析到外层环境)。
- 工具/验证锁.py:验证会话持共享锁,写入口用 --执行 在独占锁内落盘,生成/格式写入/索引生成走同一闸门。
- 工具/并行数据库测试.py:按文件分片并行,缺连接串在采集前拒绝。
- 工具/构建编排.py、环境预检.py、构建资源包.py、维护索引.py 与上述口径对齐。
- .gitignore / CI / README / AGENTS:忽略构建产物、CI 与 Makefile 单一口径、README 按实际实现陈述、AGENTS 补日常入口与验证纪律。
2026-09-18 01:14:50 +08:00

65 lines
2.0 KiB
YAML

name: 检查
on:
push:
branches: [main, feat/**]
pull_request:
jobs:
checks:
name: 检查
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: muse_acceptance
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U postgres -d muse_acceptance"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
MUSE_TEST_DATABASE_URL: postgresql://postgres@127.0.0.1:5432/muse_acceptance
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- uses: pnpm/action-setup@v4
with:
version: 10.6.4
- uses: actions/setup-node@v4
with:
node-version: "24.15.0"
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: 安装前端依赖
run: make 前端安装
- name: 安装依赖
run: make 安装
- name: 格式与类型检查
run: |
make 格式
make 类型
- name: 索引一致性
run: uv run python 工具/维护索引.py --检查
- name: 前端检查与交互测试
run: |
make 前端检查
make 前端测试
- name: 离线测试
run: make 测试
- name: 构建并验收同批安装包
run: |
make 构建
make 包验收 包=dist/muse-0.1.0-py3-none-any.whl
- name: 初始化隔离用途角色
run: psql "$MUSE_TEST_DATABASE_URL" -v ON_ERROR_STOP=1 -f 数据库/初始化/用途角色.sql
- name: 隔离数据库测试
run: make 数据库测试
- name: 固定Pi宿主整链
run: |
npm install --prefix "$RUNNER_TEMP/muse-pi" --no-save --ignore-scripts @earendil-works/pi-coding-agent@0.85.1
MUSE_PI_NODE="$(command -v node)" MUSE_PI_PACKAGE="$RUNNER_TEMP/muse-pi/node_modules/@earendil-works/pi-coding-agent" make 宿主测试