From 02603e2b7b4efda1bdf81988ef106cf54dafce2e Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Sat, 7 Aug 2021 12:37:37 +0500 Subject: [PATCH] try simple build --- apps/mobile/.github/workflows/main.yml | 49 ++++++++------------------ 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/apps/mobile/.github/workflows/main.yml b/apps/mobile/.github/workflows/main.yml index f75ade04d..4b5fa8ea2 100644 --- a/apps/mobile/.github/workflows/main.yml +++ b/apps/mobile/.github/workflows/main.yml @@ -5,42 +5,21 @@ on: [push] jobs: build: runs-on: ubuntu-20.04 - timeout-minutes: 15 - steps: - uses: actions/checkout@v2 + - name: Use Node.js v12 + uses: actions/setup-node@v1 with: - persist-credentials: false + node-version: 12.x - - uses: joschi/setup-jdk@v2 - with: - java-version: '8' - - name: Use Node.js v14 - uses: actions/setup-node@v2.1.5 - with: - node-version: 14.x - - - name: Install node_modules - run: | - yarn - - - name: Download Android Emulator Image - run: | - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-29;google_apis;x86" - echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-29;google_apis;x86' - $ANDROID_HOME/emulator/emulator -list-avds - - - name: Build for detox - run: | - yarn build-detox-android - - name: Android Emulator - timeout-minutes: 10 - continue-on-error: true - run: | - echo "Starting emulator" - nohup $ANDROID_HOME/emulator/emulator -avd emu -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 start & yarn test-detox-android + - run: yarn + working-directory: example + name: Installing node modules + + - run: ./gradlew assembleDebug -Dorg.gradle.logging.level=info + working-directory: example/android + name: Build Android apk (debug) + + - run: ./gradlew assembleRelease -Dorg.gradle.logging.level=info + working-directory: example/android + name: Build Android apk (release)