Skip to content

ci: run iOS SDK CI on pull requests to any base branch#589

Merged
ajaysubra merged 1 commit into
masterfrom
ci/run-swift-ci-on-all-prs
May 29, 2026
Merged

ci: run iOS SDK CI on pull requests to any base branch#589
ajaysubra merged 1 commit into
masterfrom
ci/run-swift-ci-on-all-prs

Conversation

@ajaysubra
Copy link
Copy Markdown
Contributor

@ajaysubra ajaysubra commented May 29, 2026

Description

The iOS SDK CI workflow (swift.yml) only ran its build + test jobs for PRs whose base branch matched the glob branches: ['*']. In GitHub Actions branch filters, * matches master but does not match any branch containing / (** is required for that). So every PR stacked onto a feature or personal base — feat/*, {initials}/* — silently skipped the entire build/test matrix:

  • library-macos-14 (Xcode 15.2, 15.4)
  • library-macos-15 (Xcode 16.4)

Those stacked PRs only ran pre-commit and the bot scanners, giving an all-green status with no compile or test coverage.

How this surfaced

Reviewing #587 (base feat/auto-push-tracking), the test target would fail to compile on Xcode 15.x, yet PR checks were green — because swift.yml never ran. gh run list --workflow swift.yml for that branch returns zero runs, and the status rollup contains only pre-commit + scanners.

Change

Drop the branches filter under pull_request: so the workflow runs on every PR regardless of base branch — mirroring pre-commit.yml, which already does this and consequently runs everywhere. push remains scoped to master. Removing the glob also eliminates the *-vs-** foot-gun entirely.

   pull_request:
-    branches:
-      - '*'
   workflow_dispatch:

Test Plan

  • On this PR (base master), confirm library-macos-14 / library-macos-15 run as before — no regression on master-targeting PRs.
  • Open or re-run a PR with a slashed base (e.g. a feat/* base) and confirm the build/test jobs now trigger.

Notes

  • codeql.yml has a related but intentional scoping (branches: ['master', 'rel/*']) and is left unchanged — expanding a heavy security scan to all PRs is a separate, cost-conscious decision.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow configuration to run on a specific branch.

Review Change Stack

The pull_request trigger filtered on `branches: ['*']`. In GitHub Actions
branch globs, `*` matches `master` but NOT base branches containing `/`
(e.g. `feat/...`, `{initials}/...`). As a result the build + test jobs
(library-macos-14 on Xcode 15.2/15.4, library-macos-15 on Xcode 16.4) were
skipped entirely for every stacked PR onto a feature/personal branch — those
PRs only ran pre-commit and the bot scanners.

Drop the branches filter so the workflow runs on every PR regardless of base,
mirroring pre-commit.yml. push remains scoped to master.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Enterprise

Run ID: 391b2758-3282-452d-90ac-941d685926d6

📥 Commits

Reviewing files that changed from the base of the PR and between 0b24232 and 9ab5e7c.

📒 Files selected for processing (1)
  • .github/workflows/swift.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/swift.yml

📝 Walkthrough

Walkthrough

The GitHub Actions Swift workflow push trigger is narrowed to run only on the master branch instead of all branches. The change replaces the wildcard branch pattern with an explicit master-branch-only filter, leaving all workflow jobs and steps unchanged.

Changes

CI Workflow Trigger Narrowing

Layer / File(s) Summary
Push trigger branch filter
.github/workflows/swift.yml
The on.push.branches configuration is updated from wildcard matching to explicit master branch targeting.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through CI flows,
Master branch is where the action goes!
No more wildcards in the night,
Just clean, focused builds done right. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: enabling iOS SDK CI to run on pull requests targeting any base branch, not just master.
Description check ✅ Passed The description is well-structured and covers most required sections with substantial detail about the problem, solution, and testing approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/run-swift-ci-on-all-prs

Comment @coderabbitai help to get the list of available commands and usage tips.

@ajaysubra ajaysubra marked this pull request as ready for review May 29, 2026 20:13
@ajaysubra ajaysubra requested a review from a team as a code owner May 29, 2026 20:13
@klaviyoit klaviyoit requested a review from ab1470 May 29, 2026 20:13
@ajaysubra ajaysubra merged commit 1d5899e into master May 29, 2026
20 checks passed
@ajaysubra ajaysubra deleted the ci/run-swift-ci-on-all-prs branch May 29, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants