Skip to content

ci: 建立 UniSpeaking 最小可用持续集成门禁 - #27

Merged
yydounai1234 merged 8 commits into
1024XEngineer:mainfrom
pionxe:codex/minimal-ci
Jul 31, 2026
Merged

ci: 建立 UniSpeaking 最小可用持续集成门禁#27
yydounai1234 merged 8 commits into
1024XEngineer:mainfrom
pionxe:codex/minimal-ci

Conversation

@pionxe

@pionxe pionxe commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

关联 RFC

《UniSpeaking 最小可用 CI 方案》
Close #25

做了什么

  • 用 Flyway V1 接管数据库 Schema,兼容空库与已有数据,并退役重复 SQL 脚本。
  • 接入 JaCoCo、Surefire、Failsafe 和 Testcontainers,补齐核心业务测试并设置 70% 行覆盖率门槛。
  • 建立按路径执行的后端、前端、Docker、Compose、Nginx 与新增依赖漏洞门禁。

怎么做

  • PostgreSQL、Redis 集成测试使用真实临时容器,覆盖迁移、CRUD、JSONB、数组、复合主键、Upsert、软删除和 TTL。
  • PR 测试 GitHub merge commit;main 更新后等待最新 merge SHA,仅重检无冲突 PR。
  • 同一 PR 自动取消旧运行,可信任务校验 SHA 后统一发布 CI / required;Actions 固定到 Commit SHA 并使用最小权限。

验证结果

  • 后端:186 项单元测试、7 项集成测试通过;JaCoCo 行覆盖率 73.80%。
  • 前端:32 条路由断言、Realtime 事件检查及 Vite 生产构建通过。
  • Flyway 空库/旧库接管、前后端镜像、Compose 配置和 nginx -t 均通过。

范围说明

本期不发布 JAR、dist 或镜像,不部署测试/生产环境,不接入生产 Redis,也不修改现有业务接口。

pionxe added 7 commits July 31, 2026 14:44
配置 JaCoCo、Surefire、Failsafe 和 CI 集成测试 Profile。

保证单元测试与集成测试可并行执行并汇总覆盖率。
将现有 Schema 转为 V1 基线迁移,并以版本 0 接管已有数据库。

停用 Spring SQL 初始化和重复手工脚本,保留幂等升级与数据兼容能力。
使用 Testcontainers 验证 Flyway、真实持久化、JSONB 和复合主键。

通过测试作用域 Redis 客户端检查读写及 TTL 到期行为。
增加场景状态机和过短评分策略测试,覆盖异常、确认与关闭分支。

单元测试增至 186 个,合并行覆盖率达到 73.80%。
按路径组织后端、前端、Docker、Compose 与依赖审查任务。

保存测试和覆盖率报告,并由 always 汇总任务统一判定门禁。
在 main 更新后轮询开放 PR 的最新 merge SHA,并跳过冲突分支。

复用 PR 并发组取消过期运行,以可信任务发布 CI / required 状态。
记录 RFC 对应关系、运行方式、报告位置和首次启用步骤。

说明 main 分支保护、提交与 PR 规范,以及不发布和不部署的范围边界。

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found in the changed code after reviewing the code-quality, performance, security, and documentation passes.

Validation: backend test compilation passed. The container integration profile could not run in this environment because the Docker socket was not accessible.

View job run

要求每次修改生产代码时同步补齐测试,并将开发质量标准提高到 80% 行覆盖率。

保留 CI 70% 过渡门槛,待测试基线稳定后再单独调整。

@yydounai1234 yydounai1234 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后面可以把覆盖率在 readme 显示下

@yydounai1234
yydounai1234 merged commit bcfa0ac into 1024XEngineer:main Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal_UniSpeaking 最小可用 CI 方案

2 participants