ci: skip unnecessary release and SDK checks#3984
Conversation
|
Clean and well-scoped CI optimization. The skip conditions correctly target only same-repo release version-sync PRs, leaving fork PRs, pushes, merge_group, and workflow_dispatch unaffected. Path narrowing in No blocking issues. |
25f74a6 to
ac5a855
Compare
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
There was a problem hiding this comment.
Pull request overview
This PR optimizes CI execution by (1) narrowing when the Python SDK workflow runs and (2) introducing a shared “Classify PR” gate in both workflows to skip CI for same-repository release/version-sync PRs.
Changes:
- Restricts
.github/workflows/sdk-python.ymlto run only when Python SDK code or the workflow itself changes. - Adds a
classify_prjob to bothci.ymlandsdk-python.ymlthat detects same-repo release/version-sync PRs (by head branch + title prefixes) and exposes askip_cioutput. - Gates downstream jobs on
needs.classify_pr.outputs.skip_ci != 'true'to skip CI for the targeted PRs while leaving ordinary PRs unaffected.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/sdk-python.yml | Narrows paths triggers and adds classify_pr + gating for the SDK Python matrix. |
| .github/workflows/ci.yml | Adds classify_pr + gates main CI jobs (lint/test/coverage comment/CodeQL) based on release/version-sync detection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
SDK Pythonworkflow paths so it only runs for Python SDK changes or edits to the workflow itself, and add a centralizedClassify PRgate that skips CI jobs for same-repository release/version-sync PRs.main, so they do not need duplicate PR CI.Classify PR, remains limited to same-repository PRs, and can be adjusted throughRELEASE_SYNC_HEAD_PREFIX/RELEASE_SYNC_TITLE_PREFIXrepository variables if release naming changes.Validation
SDK Pythonno longer runs when a PR does not touch Python SDK-related workflow scope.pathsfilters in.github/workflows/sdk-python.yml.Classify PRjob in each workflow.needs.classify_pr.outputs.skip_ci != 'true'.Scope / Risk
Testing Matrix
Testing matrix notes:
Linked Issues / Bugs
Related follow-up to #3950.