Skip to content

test: inject any SDK configuration overrides as scope tags (#5702) #1633

test: inject any SDK configuration overrides as scope tags (#5702)

test: inject any SDK configuration overrides as scope tags (#5702) #1633

name: Test Cross-Platform Sentry SDK Installation
on:
push:
branches:
- main
pull_request:
paths:
- ".github/workflows/test-cross-platform.yml"
- "Sources/**"
- "Sentry.podspec"
jobs:
test-react-native:
name: React Native
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
repository: getsentry/sentry-cocoa
path: sentry-cocoa
- name: Initialize tools
run: make init-ci-build
working-directory: sentry-cocoa
- name: Clone Sentry React Native Repository
uses: actions/checkout@v4
with:
repository: getsentry/sentry-react-native
path: sentry-react-native
- name: Enable Corepack
working-directory: sentry-react-native
run: npm i -g corepack
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
cache-dependency-path: sentry-react-native/yarn.lock
- name: Install SDK JS Dependencies
working-directory: sentry-react-native
run: yarn install
- name: Remove Sentry/HybridSDK Dependency from RNSentry.podspec
run: sed -i '' "s/s.dependency 'Sentry\/HybridSDK', '[0-9]*\.[0-9]*\.[0-9]*'/s.dependency 'Sentry\/HybridSDK'/" sentry-react-native/packages/core/RNSentry.podspec
- name: Add Sentry/HybridSDK Dependency to RNSentryCocoaTester/Podfile
run: sed -i '' -e "s/RNSentry.podspec'/RNSentry.podspec'\\n pod 'Sentry\/HybridSDK', :path => '..\/..\/..\/..\/sentry-cocoa'/" sentry-react-native/packages/core/RNSentryCocoaTester/Podfile
- name: Install App Pods
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
run: pod install
- name: Run iOS Tests
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
env:
SCHEME: RNSentryCocoaTester
CONFIGURATION: Release
DESTINATION: "platform=iOS Simulator,OS=latest,name=iPhone 16"
run: |
set -o pipefail
env NSUnbufferedIO=YES \
xcodebuild -workspace *.xcworkspace \
-scheme $SCHEME -configuration $CONFIGURATION \
-destination "$DESTINATION" \
test SWIFT_ACTIVE_COMPILATION_CONDITIONS=CROSS_PLATFORM_TEST GCC_PREPROCESSOR_DEFINITIONS"=CROSS_PLATFORM_TEST=1" | xcbeautify