Skip to content

ci: scope smoke verify to changed examples on pull requests - #38

Merged
yeongseon merged 2 commits into
mainfrom
ci/pr-scoped-verify
Aug 13, 2026
Merged

ci: scope smoke verify to changed examples on pull requests#38
yeongseon merged 2 commits into
mainfrom
ci/pr-scoped-verify

Conversation

@yeongseon

Copy link
Copy Markdown
Contributor

Summary

On pull requests, the smoke suite now runs make verify only for the example
directories touched by the diff, instead of always executing all ~23 examples.

  • PR event: diff against the base SHA → map changed files to their owning
    example directory (a dir that has an expected/ folder) → run only those.
  • Full-suite fallback when any changed file is outside every example dir
    (Makefile, scripts/, workflow, shared requirements, docs) or when the diff
    touches no example dir — a shared file can affect any example.
  • Non-PR events unchanged: push to main, nightly cron, upstream-released
    dispatch, and workflow_dispatch always run the full suite (a dependency bump
    must exercise every example, not a diff).

Implementation

  • Makefile: verify gains a VERIFY_PATHS variable (default .) that scopes
    the find roots. Full behavior is identical when unset.
  • smoke-test.yml: fetch-depth: 0 for base-diff; a new scoping step exports
    VERIFY_PATHS to $GITHUB_ENV; make verify VERIFY_PATHS=... consumes it.

Validation

  • YAML parses; make -n verify injects both . and scoped multi-path roots.
  • Scoping logic unit-checked under bash (the CI shell) across 4 cases: two
    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.

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.
@yeongseon
yeongseon merged commit f67680f into main Aug 13, 2026
6 checks passed
@yeongseon
yeongseon deleted the ci/pr-scoped-verify branch August 13, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant