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

Your CI is testing the wrong PR first

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

CI‑тесты на единственном AWS‑стеке расходуют ресурсы из‑за запуска на устаревших PR. При помощи GitHub Action priority‑boarding создаётся очередь, которая упорядочивает тесты по весу меток PR, пропускает устаревшие ветки и гарантирует, что релиз‑PR будет тестироваться последним.

Задача

CI runs on a shared test stack are wasted because multiple PRs trigger tests that will later be rebased or become stale, leading to many unnecessary runs and incorrect ordering.

Результат

Using priority-boarding reduces CI runs from ~26 to a single run per PR, eliminates wasted testing of stale commits, and ensures release PRs run last, improving resource usage and merge order.

Рабочий процесс

  • Add a wait job that polls for turn using priority-boarding action
  • Configure concurrency group on wait job to cancel outdated runs
  • Set label-weights to prioritize PRs (e.g., autorelease: pending=-10, renovate=-5)
  • Make actual test jobs depend on wait job and fail if wait fails
  • Optionally use reusable workflow for defaults

Доказательства

GitHub Actions has no opinion about who should go first. It took me an embarrassingly long time to notice how much of my CI minutes were spent testing commits that were never going to be merged in that state.

Источник

The GitHub docs even frame concurrency as the answer to shared environments: concurrency: group: integration-tests cancel-in-progress: false

Источник

With renovate=-5 and autorelease: pending=-10, your own unlabelled PRs (weight 0) are tested first, Renovate updates after that, and the release PR last.

Источник

  • Дата записи: 2026-11-01T22:58:44.878Z