Skip to content

feat: Scaffold browser telemetry project. #490

feat: Scaffold browser telemetry project.

feat: Scaffold browser telemetry project. #490

Workflow file for this run

name: sdk/react-native
on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'
jobs:
build-test-react-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- id: shared
name: Shared CI Steps
uses: ./actions/ci
with:
workspace_name: '@launchdarkly/react-native-client-sdk'
workspace_path: packages/sdk/react-native
detox-ios:
# TODO: disable detox for now because it's unstable.
if: false
# macos-latest uses macos-12 and we need macos-14 to get xcode 15.
# https://github.com/actions/runner-images/blob/main/README.md
runs-on: macos-14
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: packages/sdk/react-native/example
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install deps
run: yarn workspaces focus
- name: Build
run: yarn workspaces foreach -pR --topological-dev --from 'react-native-example' run build
- name: Install macOS dependencies
run: |
brew tap wix/brew
brew install applesimutils
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Cache Detox build
id: cache-detox-build
uses: actions/cache@v4
with:
path: ios/build
key: ${{ runner.os }}-detox-build
restore-keys: |
${{ runner.os }}-detox-build
- name: Detox rebuild framework cache
run: yarn detox rebuild-framework-cache
- uses: ./actions/release-secrets
name: 'Get mobile key'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/sdk/detox/mobile-key = MOBILE_KEY'
- name: Set mobile key
run: echo "MOBILE_KEY=$MOBILE_KEY" > .env
- name: Expo prebuild
# HACK: Deleting ios/.xcode.env.local is needed to solve an xcode build issue with rn 0.73
# https://github.com/facebook/react-native/issues/42112#issuecomment-1884536225
run: |
export NO_FLIPPER=1
yarn expo-prebuild
rm -rf ./ios/.xcode.env.local
- name: Detox build
run: yarn detox build --configuration ios.sim.release
- name: Detox test
run: yarn detox test --configuration ios.sim.release --cleanup --headless --record-logs all --take-screenshots failing