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

Bounding CI Cost Without Weakening Trust in Keploy Pull Requests

Описание и применение

Оптимизация CI‑потока GitHub Actions для Keploy: отмена старых запусков, ограничение параллелизма и проверка покрытия кода в отдельном воркфлоу.

Задача

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