DO NOT MERGE: test(ci): iOS-only change to validate platform-check action#5875
DO NOT MERGE: test(ci): iOS-only change to validate platform-check action#5875
Conversation
The platform-check step that decides whether to skip a build based on detect-changes outputs was duplicated across sample app workflows (sample-application.yml, sample-application-expo.yml) and across the build and test jobs within sample-application.yml. Extract the logic into a composite action at .github/actions/platform-check that takes the platform name, a sample_changed flag, and the needs_ios/needs_android/needs_web outputs as inputs, and returns a single skip output. The action handles the macOS → needs_ios mapping and includes a warning for unknown platforms. Replaces three inline bash scripts with a single reusable action. Closes #5865
Local composite actions (uses: ./.github/actions/...) require the repository to be checked out first. Move the actions/checkout step before platform-check and make it unconditional so the action file is available when GitHub Actions resolves it.
This is a throwaway PR to verify the platform-check composite action correctly skips Android builds when only iOS native code changes. Expected: Android matrix entries show skip=true, iOS/macOS show skip=false.
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- iOS-only change to validate platform-check action ([#5875](https://github.com/getsentry/sentry-react-native/pull/5875))If none of the above apply, you can opt out of this check by adding |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| @@ -0,0 +1 @@ | |||
| // platform-check test: ios-only change | |||
There was a problem hiding this comment.
Test file included in production CocoaPods build
Medium Severity
The new RNSentryTests.m file is placed in packages/core/ios/, which is matched by the source_files glob 'ios/**/*.{h,m,mm}' in RNSentry.podspec. This means the file will be compiled into every production app that uses this SDK via CocoaPods. While the file currently only contains a comment, it still creates an unnecessary compilation unit in production builds and sets a precedent for test files living in the production source directory. This is flagged because it was mentioned in the rules file under "Debug code shipped" (diagnostics accidentally enabled in production defaults).
Triggered by project rule: PR Review Guidelines for Cursor Bot
iOS (legacy) Performance metrics 🚀
|
iOS (new) Performance metrics 🚀
|
|
Closing since the test was completed. |


Throwaway PR to validate #5873. Expected: Android skipped, iOS/macOS builds.