Skip to content

Commit

Permalink
Add Detox iOS test workflow and install necessary dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lposen committed Oct 17, 2024
1 parent 3b544f9 commit e5562e9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Install ios-deploy, detox, react-native-cli
run: npm install -g ios-deploy detox-cli react-native-cli

- name: Install Applesimutils
run: |
brew tap wix/brew
Expand All @@ -164,7 +167,7 @@ jobs:
env:
ITBL_API_KEY: ${{secrets.ITERABLE_API_KEY}}
ITBL_ID: ${{secrets.ITBL_ID}}
run: yarn detox:start &
run: cd example && yarn detox:start &

- name: Run Detox tests
env:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Detox iOS Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
detox-ios:
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.10.0'

- name: Install dependencies
run: yarn install

- name: Install example dependencies
run: cd example ; yarn install ; cd -

- name: Install Pods
run: cd example/ios && pod install && cd ../..

- name: Start Metro Bundler
run: yarn example start --reset-cache &
env:
RCT_METRO_PORT: 8081

- name: Build the app for testing
run: yarn example detox build --configuration ios.sim.release

- name: Run Detox tests
run: yarn example detox test --configuration ios.sim.release --cleanup

0 comments on commit e5562e9

Please sign in to comment.