Skip to content

feat(ci): extend test-ios.yml to cover React Native iOS samples#163

Merged
ksroda-sa merged 4 commits into
mainfrom
feat/test-ios-rn-coverage
May 14, 2026
Merged

feat(ci): extend test-ios.yml to cover React Native iOS samples#163
ksroda-sa merged 4 commits into
mainfrom
feat/test-ios-rn-coverage

Conversation

@ksroda-sa

Copy link
Copy Markdown
Collaborator

Summary

Closes the only remaining CI gap that justified the dependabot manual-review exception for React Native: the iOS side of RN samples wasn't built in CI. Now it is.

What this changes

.github/workflows/test-ios.yml — extended from native-iOS-only to a unified workflow covering both native iOS and React Native iOS samples.

find-projects (Ubuntu, cheap)

Discovers both markers:

  • samples/ios/<flow>/project.yml (native, xcodegen)
  • samples/react-native/<flow>/ios/Podfile (RN, CocoaPods)

Same watch-root walk-up to package.json as test-android uses for RN Android — JS-side dep changes correctly trigger the iOS build for RN samples.

test (macOS runner, matrix per project)

Per-entry steps branch on project type:

Step Native iOS RN iOS
Provision xcconfig cp Config.example.xcconfig Config.xcconfig (no xcconfig)
Resolve SPM xcodebuild -resolvePackageDependencies (no SPM)
Set up Node + Corepack (no JS deps)
yarn install --immutable (RN root) (no JS deps)
pod install (no CocoaPods)
Pick iOS simulator by UDID ✓ shared ✓ shared
Build command xcodebuild test … -project …xcodeproj xcodebuild build … -workspace …xcworkspace

build (not test) for RN — those samples don't ship XCTests on the iOS side; their tests live in Jest and run via test-js.yml. The build alone validates pod install, native module autolinking, and the iOS compile path — the exact things that matter when a RN dep is bumped.

Behavior matrix on this PR

This PR only changes test-ios.yml. Effects per workflow:

Workflow Behavior
test-ios WORKFLOW_FILE changed branch → full iOS matrix (all 4 entries: 2 native + 2 RN) runs. This is the self-test of the change.
test-android No samples touched → empty matrix → skipped → aggregator green
test-dotnet / test-java / test-js Same — skipped → aggregator green
extract runs validate as normal

Known assumptions

  • RN xcworkspace is named Quickstart — true for both samples today. Future RN samples must follow this naming or we'd need dynamic discovery.
  • CocoaPods is pre-installed on macos-latest (true today; no explicit gem install cocoapods needed).
  • No caching yet for Pods/DerivedData. Can be added later if RN bumps get frequent enough that 6–8 min per matrix entry becomes painful.

🤖 Generated with Claude Code

ksroda-sa and others added 4 commits May 14, 2026 10:41
Previously test-ios.yml only built native iOS samples (samples/ios/*).
RN iOS sub-apps (samples/react-native/*/ios) had no CI coverage — the
gap that justified the dependabot manual-review exception for RN bumps.

find-projects now discovers both:
  - native iOS: project.yml at samples/ios/<flow>/
  - RN iOS: Podfile at samples/react-native/<flow>/ios/

Per-entry steps branch on project type:
  - native iOS: existing flow (xcconfig + SPM + `xcodebuild test`)
  - RN iOS: setup-node + yarn install (walk up to RN root) + pod install
    + `xcodebuild build` against the generated xcworkspace

`build` (not `test`) for RN — RN samples don't ship XCTest bundles; their
tests run via Jest, exercised by test-js.yml. The build alone validates
pod install, native module autolinking, and the iOS compile path.

The watch_root walk-up to package.json (same pattern test-android.yml
uses for RN Android) ensures JS-side changes correctly trigger the iOS
build for RN samples.

Once green, the dependabot manual-review exception for RN can be
dropped in a follow-up PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`xcodebuild -resolvePackageDependencies` (native iOS) and `pod install`
(RN iOS) both pay a non-trivial cold-fetch cost on every matrix entry.
Cache the global source caches keyed on each project's lockfile / config:

- Native iOS: ~/Library/Caches/org.swift.swiftpm and DerivedData
  SourcePackages, keyed on project.yml content.
- RN iOS: ~/Library/Caches/CocoaPods (just the source archives, not the
  per-project Pods/ dir which `pod install` regenerates deterministically),
  keyed on Podfile.lock content.

Saves ~30s per native iOS entry and ~90s per RN iOS entry on warm cache.

Also bumps actions/cache to @v5 to match the rest of the repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…0.85.3

The login-pkce sample's package.json was bumped to react-native@0.85.3
but Podfile.lock still pinned 0.85.2 — drift that the new RN iOS CI
coverage (test-ios.yml) caught on the first run.

Regenerated via `yarn install && cd ios && pod install`. Also includes
incidental quote-stripping in token-refresh's project.pbxproj
(PRODUCT_BUNDLE_IDENTIFIER) that Xcode produced as a side effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1. fail-fast: true on the iOS test matrix. macOS minutes are ~10× Ubuntu's,
   so cancelling in-flight entries on the first failure saves real money.
   Other test workflows keep fail-fast: false (Linux runner cost is small).

2. login-pkce Podfile.lock fully regenerated after nuking Pods/. The earlier
   regeneration left Pods/Local Podspecs/React-Core-prebuilt.podspec.json
   stale at 0.85.2 because CocoaPods didn't invalidate that one cached
   spec, so the lockfile inherited 0.85.2 for React-Core-prebuilt while
   every other React pod was 0.85.3 — the drift that broke CI. Fresh
   install produces a uniformly 0.85.3 lock. pbxproj is incidental Xcode
   normalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ksroda-sa
ksroda-sa marked this pull request as ready for review May 14, 2026 09:19
@ksroda-sa
ksroda-sa requested review from a team as code owners May 14, 2026 09:19
@ksroda-sa
ksroda-sa merged commit 768a96d into main May 14, 2026
23 checks passed
@ksroda-sa
ksroda-sa deleted the feat/test-ios-rn-coverage branch May 14, 2026 09:35
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.

1 participant