Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Bounding CI Cost Without Weakening Trust in Keploy Pull Requests

说明与用途

为 Keploy 优化 GitHub Actions CI:取消过时运行、限制并行度,并在专用工作流中验证代码覆盖率。

问题

GitHub Actions budget exceeded due to overlapping CI runs triggered by frequent pushes, with no cancellation policy and a single oversized workflow that mixes unprivileged and privileged steps.

结果

Reduced CI cost by canceling superseded runs, limiting matrix parallelism, and isolating privileged steps, while maintaining source‑level validation and a coverage floor.

工作流

  • Define workflow name and trigger on pull_request to main
  • Set permissions to read contents
  • Configure concurrency group with cancel-in-progress true
  • Define job validate with matrix of ubuntu-22.04 and ubuntu-24.04, timeout 20 minutes, fail-fast true, max-parallel 2
  • Checkout code without persisting credentials
  • Set up Go using go.mod, no cache
  • Locate Go caches and output paths
  • Cache Go module and build caches with key including OS, arch, matrix OS, Go version, and go.sum hash
  • Create validate.sh script that checks formatting, downloads modules, verifies, runs vet, build, tests with race and coverage, compares coverage to MIN_COVERAGE
  • Execute validate.sh

证据

There was no concept of superseded work, and different trust boundaries were collapsed into a single expensive job.

来源

Concurrency cancellation keeps only the newest run for a pull request.

来源

  • 记录日期: 2026-11-01T12:13:56.507Z