ci: gate expensive Verify steps by changed domain - #144
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideMakes the required Verify workflow change-aware by classifying PR files into validation domains and conditionally running expensive setup and checks, while failing safe on uncertain diffs and running the complete suite on pushes to main. Sequence diagram for domain-gated Verify executionsequenceDiagram
participant GitHub
participant Verify
participant Classifier
participant AppChecks
participant RulesChecks
participant E2EChecks
participant Markdown
GitHub->>Verify: Start required Verify job
Verify->>Classifier: Checkout and classify changed files
alt push to main
Classifier-->>Verify: app=true, rules=true, e2e=true, md=true
else PR diff is unavailable or contains an unknown path
Classifier-->>Verify: Enable all domains
else recognized PR paths
Classifier-->>Verify: Enable matching domain outputs
end
Classifier-->>Verify: Validate changed JSON/YAML
Verify->>Verify: Install Node dependencies when any domain is enabled
opt app enabled
Verify->>AppChecks: check:react-versions, tsc, lint, test, build
end
opt rules enabled
Verify->>RulesChecks: Setup JDK 21 and test:rules
end
opt e2e enabled
Verify->>E2EChecks: Install Chromium and run Playwright tests
end
opt md or app enabled
Verify->>Markdown: check:md-links
end
Verify-->>GitHub: Resolve single Verify check
Flow diagram for change-aware Verify CI gatingflowchart TD
A[Checkout with full history] --> B[Classify changed files]
B --> C{Push to main?}
C -->|Yes| D[Enable app rules e2e md]
C -->|No| E[Diff against origin/base]
E --> F{Diff unavailable or unknown path?}
F -->|Yes| D
F -->|No| G[Enable matching domains]
B --> H[Validate changed JSON/YAML]
D --> I[Set GitHub step outputs]
G --> I
H --> I
I --> J{Any domain enabled?}
J -->|Yes| K[Setup Node and npm ci]
J -->|No| L[Skip expensive setup]
K --> M{Enabled domains}
M -->|app| N[Typecheck lint test build]
M -->|rules| O[Setup JDK and run rules tests]
M -->|e2e| P[Install Chromium and run smoke tests]
M -->|md or app| Q[Check Markdown links]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This branch was successfully deployed
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
Makes CI change-aware inside the single required
Verifyjob: a classifier step diffs the PR againstmain, groups the expensive work by domain (app / rules / e2e / markdown), and gates the corresponding steps. Pushes tomainstill run everything.Previously a docs-only PR paid for
npm ci, JDK 21 setup, the Firebase emulator rules suite, a Chromium download, and a production build.Required-check safety
Verifystays a single always-present job — the required check name is unchanged and can never go pending. Steps are gated individually, so the check resolves success quickly when a domain is irrelevant.The classifier fails safe: uncomputable diff or unrecognized path → run all step groups. Cheap JSON/YAML validation runs inside the classifier for config-only changes.
Expected behavior
vercel.json,.github/**,.vscode/***.mdapp/**,components/**,lib/**,public/**,content/**, build configfirestore.rules,storage.rules,firebase.json,rules-tests/**tests/**,*.test.ts,scripts/**,eslint.config.mjssmoke-tests/**,playwright.config.tspackage.json/package-lock.json/.nvmrcmainValidation
Classifier logic exercised locally against simulated diffs. Workflow YAML validated.
Generated with Devin
Summary by Sourcery
Make the required Verify workflow change-aware so pull requests run only the validation domains affected by their changes while retaining safe full-coverage behavior.
New Features:
Bug Fixes:
Enhancements:
CI: