ci: Skip test suite when no code files changed#5889
Draft
stephanie-anderson wants to merge 5 commits intomasterfrom
Draft
ci: Skip test suite when no code files changed#5889stephanie-anderson wants to merge 5 commits intomasterfrom
stephanie-anderson wants to merge 5 commits intomasterfrom
Conversation
Add a `changes` detection job using dorny/paths-filter to all test
workflows and ci.yml. Tests are only triggered when code-relevant
files are modified (*.py, *.cfg, *.toml, *.ini, sentry_sdk/**, tests/**,
scripts/**, Makefile, .github/workflows/**).
PRs that only touch non-code files (e.g. README.md) will skip the
full test matrix, saving CI resources. Pushes to master/release
branches always run the full suite.
The gate jobs ("All X tests passed") now accept `skipped` as a valid
result so required status checks still pass when tests are skipped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Langchain
Bug Fixes 🐛Ci
Openai
Other
Internal Changes 🔧Langchain
Openai
Other
Other
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 9.62s All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 14412 uncovered lines. Generated by Codecov Action |
- Add requirements*.txt to path filters so dependency changes trigger CI - Gate job now also fails if the changes detection job itself fails, preventing untested code from passing CI when change detection errors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Direct pushes to master are not allowed, so there's no need to force-run the full suite on push events. The paths-filter action now runs unconditionally for both push and pull_request events. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Explicitly check for failure and cancelled states instead of excluding success and skipped. This fixes a bug where a cancelled changes job would let the gate pass silently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same pattern as the test workflows — a gate job that always runs and explicitly checks for failure/cancelled states on all CI jobs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
changesdetection job (usingdorny/paths-filter) to all 16 test workflows andci.yml*.py,*.cfg,*.toml,*.ini,sentry_sdk/**,tests/**,scripts/**,Makefile,requirements*.txt,.github/workflows/**README.md,LICENSE,CHANGELOG.md) skip the full test matrixskippedas a valid result so required status checks still passChanges
base.jinja,test_group.jinja,check_required.jinja): Addedchangesjob, conditional test execution, and skipped-aware gate checksci.yml: Same pattern applied to lint, build, and docs jobsTest plan
README.md→ verify tests are skipped and gate jobs pass.pyfile → verify tests run normallyCo-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com