Skip to content

Commit

Permalink
Run iOS tests in simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Sep 9, 2024
1 parent 33a408f commit dece8de
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 23 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
# run: |
# yarn turbo run android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

build-ios:
test-ios:
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
Expand Down Expand Up @@ -208,9 +208,13 @@ jobs:
env:
NO_FLIPPER: 1

- name: Build example for iOS
# - name: Build example for iOS
# run: |
# yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

- name: run tests
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
./scripts/test-ios.sh
build-ios-sqlcipher:
runs-on: macos-latest
Expand Down
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios --scheme='debug' --simulator='iPhone 15 Pro'",
"run:ios": "react-native run-ios --scheme='debug'",
"start": "react-native start",
"pods": "cd ios && bundle exec pod install",
"pods:nuke": "cd ios && rm -rf Pods && rm -rf Podfile.lock && bundle exec pod install",
Expand Down
4 changes: 0 additions & 4 deletions scripts/test-android.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
JAVA_OPTS=-XX:MaxHeapSize=6g yarn turbo run run:android:release --cache-dir=.turbo/android
adb forward tcp:9000 tcp:9000
# echo "🟦 Android device address:"
adb shell ip addr show
# echo "📱 Android Emulator IP Address:"
# adb shell ifconfig | grep "inet addr" | awk '{print $2}' | awk -F: '{print $2}'
echo "Polling in-app server..."
node ./scripts/poll-in-app-server.js
4 changes: 4 additions & 0 deletions scripts/test-ios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
yarn turbo run run:ios --cache-dir=.turbo/ios

echo "Polling in-app server..."
node ./scripts/poll-in-app-server.js
17 changes: 1 addition & 16 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build:android": {
"inputs": [
"package.json",
"android",
"!android/build",
"src/*.ts",
"src/*.tsx",
"example/package.json",
"example/android",
"!example/android/.gradle",
"!example/android/build",
"!example/android/app/build"
],
"outputs": []
},
"run:android:release": {
"inputs": [
"package.json",
Expand All @@ -31,7 +16,7 @@
],
"outputs": []
},
"build:ios": {
"run:ios": {
"inputs": [
"package.json",
"*.podspec",
Expand Down

0 comments on commit dece8de

Please sign in to comment.