ci: scope smoke verify to changed examples on pull requests - #38
Merged
Conversation
PRs now run make verify only for example directories touched by the diff, falling back to the full suite when a shared file (Makefile, scripts/, workflow, requirements, docs) changes or no example dir is affected. Non-PR events (push to main, cron, upstream-released, workflow_dispatch) always run the full suite.
Validate each selected example root against [A-Za-z0-9._/-]; any path with shell metacharacters, spaces, or newlines forces the full-suite fallback, closing the injection and word-splitting surface from PR-controlled directory names.
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
On pull requests, the smoke suite now runs
make verifyonly for the exampledirectories touched by the diff, instead of always executing all ~23 examples.
example directory (a dir that has an
expected/folder) → run only those.(Makefile,
scripts/, workflow, shared requirements, docs) or when the difftouches no example dir — a shared file can affect any example.
main, nightly cron,upstream-releaseddispatch, and
workflow_dispatchalways run the full suite (a dependency bumpmust exercise every example, not a diff).
Implementation
Makefile:verifygains aVERIFY_PATHSvariable (default.) that scopesthe
findroots. Full behavior is identical when unset.smoke-test.yml:fetch-depth: 0for base-diff; a new scoping step exportsVERIFY_PATHSto$GITHUB_ENV;make verify VERIFY_PATHS=...consumes it.Validation
make -n verifyinjects both.and scoped multi-path roots.example files → scoped; example + Makefile → full; README only → full;
empty diff → full.
Note: the dominant CI cost (CUBRID container + dependency install) is fixed, so
this trims per-example execution on focused PRs without changing release/nightly
coverage.