ci: Skip test suite when no code files changed by stephanie-anderson · Pull Request #5889 · getsentry/sentry-python
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>
Bot
reviewed
- 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>
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>
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