File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 # tool-cache: true
3535 # android: false
3636
37- - name : Set E2E env for workflow
38- run : echo "E2E=true" >> $GITHUB_ENV
39-
4037 - name : Set up JDK 17
4138 uses : actions/setup-java@v4
4239 with :
@@ -113,18 +110,18 @@ jobs:
113110 avd-name : e2e_emulator
114111 arch : x86_64
115112 script : |
116- # Start Metro in the background
117- yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log &
118- # Wait for emulator to boot fully
113+ bash -c '
114+ export E2E=true
115+ yarn start &> output.log &
119116 $ANDROID_HOME/platform-tools/adb wait-for-device
120- $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
121- # Install the app APK
122- $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk
123- # Launch the app using bash
124- bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done'
125-
126- # Run your E2E tests
117+ $ANDROID_HOME/platform-tools/adb shell "while [[ -z \$(getprop sys.boot_completed) ]]; do sleep 1; done;"
118+ $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk
119+ until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do
120+ sleep 1
121+ echo "Retrying app launch..."
122+ done
127123 yarn e2e
124+ '
128125
129126 # - name: Start Metro server
130127 # working-directory: apps/${{ env.WORKING_DIRECTORY }}
You can’t perform that action at this time.
0 commit comments