ci: add default branch checks and codspeed benchmark
Merged
MA
5mo ago+587+587+012345678901234567890123456789-92-92-01234567890123456789
What changed
- Add an always-run
Core CIworkflow for PRs targetingpersonal/local-clients. - Add a CodSpeed workflow and a small Rust normalization benchmark for initial advisory performance reporting.
- Include
personal/local-clientsin existing CI workflow branch filters and replace hardcodedmaincoverage badge conditions with the repository default branch. - Make pricing command tests use fixture pricing caches instead of leaking to live network/cache state.
Why
This prepares the self-maintained fork default branch for ruleset protection and CodSpeed without blocking normal solo-maintainer direct pushes. The core required check can be enabled after this workflow lands on the default branch.
Validation
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-features -- -D warningscargo test --locked --workspace --all-featurescargo bench --locked -p tokscale-core --bench normalization -- --test
Summary by cubic
Add Core CI for PRs targeting personal/local-clients, add CodSpeed benchmarks (simulation) for normalization and JSON/JSONL parsing, and restrict coverage to default-branch, non-PR runs with artifacts only. Actions are pinned to SHAs, pricing CLI tests are stabilized, and core dev-dependencies are centralized.
-
New Features
- Core CI for PRs to
personal/local-clients. - CodSpeed workflow with
codspeed-criterion-compatbenches for normalization and JSON/JSONL parsing; bench profile optimized for CI; CodSpeed badge in README. - CI workflows include
personal/local-clientsin branch filters; Actions pinned to SHAs; core dev-dependencies centralized.
- Core CI for PRs to
-
Bug Fixes
- Pricing command tests use local fixture caches and a temp HOME to avoid flakiness.
- Fixed cargo cache/install conflict in the CodSpeed job.
- Coverage: only on non-PR runs on the repository default branch with read-only permissions; removed badge generation/extraction and commits; artifacts only.
Summary by CodeRabbit
- Chores
- 新增 CodSpeed 性能测试工作流,并完善 Core CI 与代码覆盖率流程
- 扩展多套 CI 工作流的触发分支范围,且将关键构建步骤固定到可复现的版本
- 调整基准构建与运行配置(如 bench 构建选项与相关依赖)
- Tests
- 新增核心归一化/解析相关基准测试
- 改进定价相关 CLI 测试:统一使用隔离的临时 HOME 与定价夹具环境
- Documentation
- README 增加 CodSpeed 指标徽标展示