ci: skip CI jobs when unaffected by changed paths#1380
Conversation
Add a dorny/paths-filter "changes" detection job to the PR-triggered workflows so jobs only run when relevant paths change: - Lint / Typecheck: only when package code, spec, or lint configs change - Generated files: only when codegen inputs/outputs change - JS / Python / CLI SDK tests: only when the respective SDK changes (CLI also runs when the JS SDK changes, since it builds against it) The SDK test jobs are gated inside the reusable workflows via a new `run` input so the required matrix status checks still report (skipped jobs report success), keeping branch protection satisfied. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Reusable JS / Python / CLI workflows gain a Reviewed by Cursor Bugbot for commit e430fc8. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Package ArtifactsBuilt from 075fdf1. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.27.2-mishushakov-conditional-ci-jobs.0.tgzCLI ( npm install ./e2b-cli-2.10.4-mishushakov-conditional-ci-jobs.0.tgzPython SDK ( pip install ./e2b-2.25.1+mishushakov.conditional.ci.jobs-py3-none-any.whl |
dorny/paths-filter falls back to git commands on non-PR events, which fails without a checkout. Guard the filter step to pull_request only; the run inputs already force a full run on workflow_dispatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68854cbb35
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Enumerating individual generated outputs was fragile and missed the Python volume/mcp codegen targets. Generated files are interleaved with hand-written code inside the SDK source trees, so watch the whole trees to catch drift without maintaining a per-file allowlist. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Simpler and fully robust: any package change re-verifies generated code is in sync, with no per-path allowlist to maintain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 530b52d. Configure here.
The codegen toolchain versions are pinned via the lockfile/package.json and .tool-versions, so a dependency-only PR can change generated output. Watch the same shared paths as the lint/typecheck/sdk-tests filters. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Adds a
dorny/paths-filterchange-detection job to the PR-triggered workflows so jobs only run when relevant paths change: Lint/Typecheck run only when package code, spec, or lint configs change; Generated files runs only when codegen inputs/outputs change; and the JS/Python/CLI SDK tests run only when the respective SDK changes (CLI also runs on JS SDK changes since it builds against it). The SDK test jobs are gated inside the reusable workflows via a newruninput rather than by skipping the caller, so the required matrix status checks still report (skipped jobs report success) and branch protection stays satisfied. Shared paths (spec, lockfiles,package.json,.tool-versions) andworkflow_dispatchruns still trigger everything.🤖 Generated with Claude Code