ci: prep test/lint workflows for a merge queue#677
Conversation
Add a bare `merge_group:` trigger and a single aggregator job to each of test.yml and lint.yml so they can gate a GitHub merge queue, and keep path-filtering working inside the queue. - merge_group trigger: a merge queue blocks until required checks report; a workflow path-filtered out of the merge_group event would never run, freezing the queue. The trigger is bare (no top-level paths). - paths-filter @V3 -> @v4 + explicit merge-group base/ref: v4 adds merge_group support; passing base_sha/head_sha lets it diff the merge group so only affected suites run in the queue (PyO3/vector pattern). base/ref are empty on pull_request/push, where paths-filter ignores them. - {test,lint}-conclusion aggregator: one required status check that passes only if every job succeeded or was skipped. `if: !cancelled()` is required so a failed dependency can't skip the gate (a skipped required check reads as success). Keep `needs` in sync when adding jobs. Does not enable the merge queue; that is a follow-up ruleset change once these conclusion checks have run once and can be marked required.
CodeQL flagged both aggregator jobs for not limiting GITHUB_TOKEN scope.
They only run jq over toJSON(needs), so add an explicit permissions: {}
(no permissions needed).
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughBoth GitHub Actions workflows (lint and test) now support GitHub merge queues by detecting ChangesMerge Queue Support for CI Workflows
🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…port (#679) ## Problem After enabling the merge queue, `Test (conclusion)` and `Lint (conclusion)` were made **required** status checks. But `test.yml` / `lint.yml` still had a `paths:` filter on the **`pull_request`** trigger, so a PR not touching those paths never runs the workflow — and the required conclusion check stays **Pending**, blocking the PR from merging. Observed live on #678 (changed only `scripts/test/e2e/**` + `make/**` → `test.yml` never ran → `Test (conclusion)` missing). Confirmed by [GitHub docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks): *"a workflow skipped due to path filtering... checks... remain 'Pending'... blocked from merging."* ## Fix Remove the `paths:` filter from the `pull_request` trigger on both workflows so they run on **every** PR (matches rust-analyzer/bevy, which have no top-level paths on their gating workflows). Nothing else changes: - Per-suite filtering still happens in the `changes` job (heavy jobs skip when unaffected). - The conclusion job reports `success`-or-`skipped`, so it always reports green for unrelated PRs. - `push:` paths are kept as-is (irrelevant to PR gating). Cost: ~3 small jobs (config/changes/conclusion) per workflow per PR. ## Note PRs opened before #677 merged still lack the conclusion jobs entirely and need a rebase onto `main` to pick them up — separate from this fix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI/CD workflows to ensure status checks remain responsive on all pull requests targeting main, preventing them from getting stuck in a pending state. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What
Prepares
test.ymlandlint.ymlso they can gate a GitHub merge queue, without enabling the queue yet.Three edits per workflow:
merge_group:trigger — a merge queue blocks until required checks report; a workflow that's path-filtered out of themerge_groupevent never runs and freezes the queue. The trigger has no top-levelpaths:.dorny/paths-filter@v3 → @v4+ explicit merge-groupbase/ref— v4 addsmerge_groupsupport; passingbase_sha/head_shalets it diff the merge group so only affected suites run in the queue.base/refare empty onpull_request/push, where paths-filter ignores them. (PyO3 / vector pattern.){test,lint}-conclusionaggregator — one required status check that passes only if every job succeeded or was skipped (path-filtered).if: !cancelled()is required so a failed dependency can't skip the gate, which GitHub would read as success.needsmust be kept in sync when jobs are added/removed.Why now (not enabling the queue here)
The conclusion checks must run at least once on a PR before they can be selected as required status checks. This PR makes that happen. Enabling the merge queue is a follow-up ruleset change (swap
license/cla→ the two conclusion checks, turn off strict "require up to date", turn on "require merge queue").Verification
actionlintparses both files with no new errors (pre-existing warnings ontest.yml:128codecov input andlint.yml:142shellcheck are in untouched jobs).Test (conclusion)andLint (conclusion)to appear as checks.Full runbook:
docs/development/merge-queue-setup.md(separate).Summary by CodeRabbit