新增 .gitea/workflows/parity-nightly.yml(cron 每日 02:00 CST + workflow_dispatch,跑 scripts/ci.sh 全量 seed+all+privilege 对拍 + 归档报告)。ParityCli 本就直连 JDBC 基线 vs 引擎 REST 逐行 diff、不一致退出码 2=「非0即阻断」内建;此前只 push 时跑,无提交的日子不跑→隐性漂移逃逸。夜间 job 补上。RowDiffTest 30/30 框架健康。§10.2 标 🟡:真正重拍刷新基线需 dev/CI 起引擎+真 DB 实跑(headless 跑不了),激活需 Gitea runner;--discover/--realprivilege 纳硬门前需真跑核实退出语义。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54 lines
2.0 KiB
YAML
54 lines
2.0 KiB
YAML
# eip4-platform 夜间对拍(Gitea Actions)。
|
|
#
|
|
# P1 修复(§10.2「逐行对拍框架已冻结」):push CI(ci.yml)只在有提交时跑对拍,无提交的日子不跑;
|
|
# 本工作流按 cron 每夜跑一次全量对拍——直连 JDBC(基线)vs 引擎 REST(被测)逐行逐列 diff,
|
|
# ParityCli 任一实体不一致即退出码 2 → 本 job 红(「本次 vs 基线 diff 非 0 即阻断」由 ParityCli 退出码内建)。
|
|
# 即便没人提交代码,也能捕获引擎/转换器/运行库的隐性漂移。
|
|
#
|
|
# 触发:每日 18:00 UTC(02:00 CST)+ 手动 workflow_dispatch。
|
|
# 前置条件:Gitea 实例需启用 Actions 且注册带 `ubuntu-latest` 标签的 act_runner;否则不会被调度。
|
|
#
|
|
# 注:--seed --all + --privilege 为硬门(本 job 跑这两项)。更广的 --discover(发现式抽样)/
|
|
# --realprivilege(客户库真实规则)退出语义偏探索性,暂未纳入硬门 job,见 §10.2 follow-up。
|
|
name: parity-nightly
|
|
on:
|
|
schedule:
|
|
- cron: "0 18 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
nightly-parity:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:15
|
|
env:
|
|
POSTGRES_USER: ci
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
ports: ["5433:5432"]
|
|
options: >-
|
|
--health-cmd "pg_isready -U ci" --health-interval 5s
|
|
--health-timeout 5s --health-retries 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "21"
|
|
cache: maven
|
|
- name: 全量对拍(种子 21 实体 + C2 权限,逐行 diff,不一致即红)
|
|
env:
|
|
CI_PG_HOST: localhost
|
|
CI_PG_PORT: "5433"
|
|
CI_PG_USER: ci
|
|
CI_DB: eip4parity
|
|
CI_PORT: "8090"
|
|
run: bash scripts/ci.sh
|
|
- name: 归档对拍报告
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: parity-reports-${{ github.run_id }}
|
|
path: parity-reports/parity-*.json
|
|
if-no-files-found: ignore
|