Skip to content

chore: Add Detox e2e tests for RN SDK. #216

chore: Add Detox e2e tests for RN SDK.

chore: Add Detox e2e tests for RN SDK. #216

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:
runs-on: macos-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- 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
- 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: Install and run tests
run: |
brew tap wix/brew
brew install applesimutils
cd packages/sdk/react-native/example
echo "MOBILE_KEY=$MOBILE_KEY" > .env
./build-run-detox.sh
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1