Last active
October 29, 2021 17:05
-
-
Save pedrorosarioo/07658edc8983bce30c0098bcf90ce264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Detox E2E Test - Android | |
# on: ... | |
jobs: | |
e2e-android: | |
name: E2E-Android | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 1 | |
- name: Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Use specific Java version for sdkmanager to work | |
uses: joschi/setup-jdk@v1 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
with: | |
java-version: 'openjdk8' | |
architecture: 'x64' | |
- name: Download Android Emulator Image | |
run: | | |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-27;google_apis;x86" | |
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name E2E_Emulator --device "Nexus 5" -k 'system-images;android-27;google_apis;x86' | |
$ANDROID_HOME/emulator/emulator -list-avds | |
- name: Install node_modules | |
run: | | |
yarn install --frozen-lockfile --network-timeout 100000 | |
- name: Build for detox | |
run: | | |
yarn e2e:android-build | |
- name: Android Emulator | |
timeout-minutes: 10 | |
continue-on-error: true | |
run: | | |
echo "Starting emulator" | |
nohup $ANDROID_HOME/emulator/emulator -avd E2E_Emulator -no-audio -no-snapshot -no-window & | |
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | |
$ANDROID_HOME/platform-tools/adb devices | |
echo "Emulator started" | |
- name: Android Detox | |
run: yarn e2e:android-test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment