ci(workflows): migrate ci.yml to dorny/paths-filter detect job (#413) - #442
ci(workflows): migrate ci.yml to dorny/paths-filter detect job (#413)#442yoshi280 wants to merge 0 commit into
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideMigrates the CI workflow from using Sequence diagram for CI workflow with detect and pytest jobssequenceDiagram
actor Developer
participant GitHub
participant CI_workflow
participant detect_job
participant pytest_job
participant paths_filter
Developer->>GitHub: push commits / open PR
GitHub->>CI_workflow: trigger pull_request event
CI_workflow->>detect_job: start detect job
detect_job->>paths_filter: run filters for python paths
paths_filter-->>detect_job: set output python true or false
detect_job-->>CI_workflow: expose output python
CI_workflow->>pytest_job: evaluate if condition
alt python output true
CI_workflow->>pytest_job: run matrix for Python 3.12 and 3.13
pytest_job-->>CI_workflow: report success or failure
else python output false
CI_workflow-->>pytest_job: mark matrix jobs skipped
end
CI_workflow-->>GitHub: report pytest checks registered and completed
GitHub-->>Developer: show required checks success or skipped
Flow diagram for paths-filter gating pytest jobsflowchart TD
A[Changed files in PR] --> B[Run dorny paths-filter with python filter]
B -->|matches src tests pyproject toml uv lock ci yml| C[Set output python true]
B -->|no matches| D[Set output python false]
C --> E[Run pytest matrix for Python 3.12 and 3.13]
E --> G[pytest jobs pass or fail]
D --> F[Mark pytest matrix jobs as skipped]
F --> H[Branch protection treats checks as satisfied]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
| - uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@v4 |
| - uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@v4 |
|
This PR is now behind Auto-rebase was removed because the bot has no signing key; rebasing as the bot strips author signatures and the |
|
[claim:review:Toug:2026-05-06T21:09:00Z] |
60387b3 to
da6bfaa
Compare
|
[release:review:Toug:2026-05-06T21:10:56Z] |
Closes the docs-PR merge block
Branch protection requires
pytest (3.12)+pytest (3.13)on every PR. The currentci.ymlusespaths-ignoreto skip the workflow on docs-only changes — but that makes those checks register asexpected(i.e., "not satisfied yet, waiting"), which branch protection treats as a blocker. Result: docs-only PRs cannot merge.Concretely: #426 (README v1.7 row → shipped) hit this today.
The TODO at the old
ci.yml:9-11calls out exactly this fix: "once branch protection requires this check, migrate to a dorny/paths-filter detection job so the workflow always runs and reports a status, with downstream jobs gated byif:." This PR does that.What changes
paths-ignore).detectjob usesdorny/paths-filter@v3.0.2(SHA-pinned per repo convention) to classify whether the diff touches Python source / tests /pyproject.toml/uv.lock/ the workflow itself.pytestmatrix gates onif: needs.detect.outputs.python == 'true'. When the diff is docs-only, bothpytest (3.12)andpytest (3.13)register as skipped — which branch protection accepts as satisfied. When the diff touches Python, both run as before.Why this works
Branch protection distinguishes:
expected(workflow excluded bypaths-ignore/ never registered) → blocks merge.skipped(job registered butif:evaluated false) → satisfies the required check.The migration shifts gating from "does the workflow run at all" to "does the work inside the workflow run." Registration is unconditional; the work is conditional.
Refs
.github/workflows/ci.yml:9-11pre-migration.paths-ignoreintroduction: PR merging / review / CI pipeline too strict #413.Closes the gap. After this lands, #426 just needs a close+reopen on its existing branch to retrigger CI under the new logic, then it can FF-merge.
Summary by Sourcery
Migrate the CI workflow to always run on pull requests and use a detection job to conditionally run pytest based on changed files.
CI: