ci: run selective jobs on pull requests, full gate on push#323
Merged
Conversation
Add dorny/paths-filter change detection so a pull request only runs the jobs its change can affect: a docs-only PR runs the guards alone, Binary Compatibility runs only when the graph-compose-core module changed, and the Performance Smoke Check only when core / render-pdf / templates changed. Pushes to main / develop / 2.0-dev and manual dispatch always run the full reactor build + examples (defence in depth). Add a CI Gate job that aggregates the selective jobs into one stable status check, green when every job that ran passed (a job skipped by the filter counts as success). Point branch protection at CI Gate plus the always-run guards so a docs-only PR is not left waiting on a skipped matrix leg.
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.
Why
CI runs the full 3-JDK reactor matrix + examples + japicmp + benchmark smoke on every PR, including docs-only PRs that can't affect the build. With the 2.0 module split, most PRs touch one area and don't need the whole pipeline.
What
changesjob (dorny/paths-filter) emittingcode/core/perfflags, and gate the heavy jobs on them for pull requests only:Architecture and Documentation Guardsalone; build-and-test, examples, japicmp, and the perf smoke all skip.Binary Compatibility(japicmp) runs only when thegraph-compose-coremodule (src/**/pom.xml) changed.Performance Smoke Checkruns only when core / render-pdf / templates changed.main/develop/2.0-devand manual dispatch always run the full gate (2.0-devadded to the push triggers) — defence in depth on integration branches.CI Gateaggregate job: one stable status check, green when every job that ran passed (a job the filter skips counts as success).Point required checks at
CI Gate+Architecture and Documentation Guards(theirname:values), not the individual matrix legs (Build and run tests (JDK 17), …). A docs-only PR legitimately skips those legs, so if they stay required the PR waits forever on a check that never reports — that's exactly whatCI Gateexists to avoid.Tests
Pure CI-config change (no runtime code). YAML validated, job dependency graph checked, and the scenarios traced by hand + by an independent pass: docs-only PR → guards + gate only; core PR → everything; templates PR → +benchmark, −japicmp; render-docx PR → build+examples, −japicmp −benchmark; push to
2.0-dev→ full reactor + examples.CanonicalSurfaceGuardTestgreen (scans the CONTRIBUTING edit). The new logic takes effect for PRs opened after merge; this PR's own run uses the base-branch workflow.