ci: consolidate required checks into single gate workflow#2044
Merged
Conversation
Replace 7 individual required-check workflows (unit-tests, mypy, 5 E2E tests) with a single ci.yaml following the astral-sh/ruff gate pattern: - determine-changes job uses native git diff (no third-party deps) - Each test job skipped at job level when paths don't match - Single required-checks-passed gate job accepts success + skipped - E2E security preserved: environment gating, author allowlists This fixes the long-standing issue where workflow-level path filters leave required checks "Pending" on PRs that don't touch code paths, blocking merge without admin override. Estimated savings: ~$1.05/skipped PR ($0.64 unit-tests + $0.01 type-check + $0.40 E2E), ~$50-100/yr in compute, plus eliminating all admin-merge workarounds.
ci.yaml was in all three check_paths calls, so creating/modifying the workflow itself triggered all test jobs. Workflow-only PRs should skip tests — the gate job still validates the pattern.
Add all non-required-check E2E workflows and prek lint to the consolidated ci.yaml: - 4 standard Python E2Es (async, benchmark, coverage, init) - 3 JS E2Es (cjs-function, esm-async, ts-class) - 2 Java E2Es (fibonacci-nogit, tracer) - prek lint New change detection outputs: - e2e_js: triggers JS E2Es when packages/ changes - e2e_java: triggers Java E2Es when java runtime/fixtures change Total: 17 jobs + determine-changes + gate = 19 jobs in one file. Down from 22 workflow files to 7 (remaining are non-test: claude, codeflash self-optimize, label-workflow-changes, publish, java-e2e). Additional savings per irrelevant PR: ~$0.80 (10 jobs x ~$0.08). Total per skipped PR: ~$1.85.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces 17 individual workflow files with a single
ci.yamlfollowing the astral-sh/ruff gate pattern:determine-changesjob uses nativegit diff --quietagainst merge base (zero third-party dependencies)needs:+if:required-checks-passedgate job (if: always()) accepts both "success" and "skipped" viajqcheckunit_tests,type_check,e2e,e2e_js(packages/),e2e_java(java runtime + fixtures)Why
Workflow-level
paths:filters leave required checks stuck at "Pending" when a PR doesn't touch matching files (e.g., workflow-only changes, dependabot bumps). This is a known GitHub limitation with no native fix. We've been admin-merging as a workaround.With job-level
if:conditions, skipped jobs report as "skipped" → the gate job accepts them → PR is mergeable without admin override.Cost savings
Real value is operational: no more admin merges, CI is self-service, and workflow file count drops from 22 to 7.
After merge
Update the
main-branchruleset to replace all 13 individual required checks with the singlerequired-checks-passedcheck.Test plan
determine-changesdetects no code changes, all 17 jobs skippedrequired-checks-passedgate job reports "success" (all upstream skipped)