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

Your CI is testing the wrong PR first

说明与用途

在单一 AWS 堆栈上运行 CI 测试会因在过时 PR 上执行而浪费资源。使用 priority‑boarding GitHub Action 创建队列,按 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