ci: 扩大构建与测试覆盖范围,纳入集成测试与二进制入口

cargo build --lib 改为 cargo build,确保 main.rs(gateway 二进制入口)也被编译验证;
cargo test --lib 改为 cargo test,纳入 tests/ 目录的集成测试。
test_request_format.rs 的 8 个序列化测试此前从未在 CI 中运行,现在会实际执行;
test_integration.rs / test_tool_calling.rs 中的 #[ignore] 测试会被编译但跳过执行(需真实 API key)。
This commit is contained in:
oudecheng 2026-08-04 08:09:51 +08:00
parent b790a39c1f
commit 94a0dd0169

View File

@ -48,10 +48,14 @@ jobs:
run: cargo clippy --all-targets --all-features
- name: Build
run: cargo build --lib
# 构建 lib + 二进制入口main.rs确保 gateway 二进制也被编译验证
run: cargo build
- name: Run tests
run: cargo test --lib
# 运行 lib 单元测试 + tests/ 集成测试
# test_integration.rs / test_tool_calling.rs 中的 #[ignore] 测试
# 需要真实 API key会被跳过test_request_format.rs 的测试会实际执行
run: cargo test
frontend-checks:
name: Frontend build + test