From d3a43e2c4fe29c24da54f3a4a55e63bbe58016bc Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 30 Oct 2023 12:03:39 +0200 Subject: [PATCH 1/5] Debug mobile CI failures --- .github/workflows/mobile-test-run.yml | 29 +++++++++++---------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/mobile-test-run.yml b/.github/workflows/mobile-test-run.yml index 6901de0..35cc08e 100644 --- a/.github/workflows/mobile-test-run.yml +++ b/.github/workflows/mobile-test-run.yml @@ -50,18 +50,6 @@ jobs: restore-keys: | tests-history-cache - - name: Spin-up Android emulator - if: matrix.platform == 'Android' - run: | - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" - echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n "$DEVICE_NAME" -k "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" --force - echo $ANDROID_HOME/emulator/emulator -list-avds - echo "Starting emulator" - nohup $ANDROID_HOME/emulator/emulator -avd "$DEVICE_NAME" -no-snapshot -delay-adb > /dev/null 2>&1 & - $ANDROID_HOME/platform-tools/adb wait-for-device - $ANDROID_HOME/platform-tools/adb devices -l - echo "Emulator started" - - name: Spin-up iOS simulator if: matrix.platform == 'iOS' run: xcrun simctl create "$DEVICE_NAME" "$IOS_DEVICE_TYPE_ID" | xargs xcrun simctl boot @@ -107,11 +95,18 @@ jobs: - name: Run Android tests if: matrix.platform == 'Android' - run: | - ./gradlew runStories -Pvividus.configuration.suites=mobile_app/android \ - -Pvividus.configuration.profiles=mobile_app/local2,mobile_app/android \ - -Pvividus.allure.history-directory=output/history/android \ - -Pvividus.selenium.grid.capabilities.deviceName="$DEVICE_NAME" + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 29 + avd-name: ${{ env.DEVICE_NAME }} + force-avd-creation: false + emulator-options: -no-snapshot -delay-adb + script: | + ./gradlew runStories -Pvividus.configuration.suites=mobile_app/android \ + -Pvividus.configuration.profiles=mobile_app/local2,mobile_app/android \ + -Pvividus.allure.history-directory=output/history/android \ + -Pvividus.selenium.grid.capabilities.deviceName="$DEVICE_NAME" + - name: Publish ${{ matrix.platform }} tests report if: always() From f9221dc62e6c34e7603faf9e1be447d0d8e7b980 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 30 Oct 2023 13:37:58 +0200 Subject: [PATCH 2/5] Update mobile-test-run.yml --- .github/workflows/mobile-test-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mobile-test-run.yml b/.github/workflows/mobile-test-run.yml index 35cc08e..f8f0b3e 100644 --- a/.github/workflows/mobile-test-run.yml +++ b/.github/workflows/mobile-test-run.yml @@ -3,7 +3,7 @@ name: Mobile Demo Test Run env: DEVICE_NAME: vividus-test-device ANDROID_EMU_ABI: x86 - ANDROID_EMU_TARGET: android-29 + ANDROID_EMU_TARGET: android-30 ANDROID_EMU_TAG: default IOS_DEVICE_TYPE_ID: iPhone 14 Pro Max From 72f0fe170fd77a5840b72530bb4bf97d14709b39 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 30 Oct 2023 18:08:39 +0200 Subject: [PATCH 3/5] Update mobile-test-run.yml --- .github/workflows/mobile-test-run.yml | 31 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mobile-test-run.yml b/.github/workflows/mobile-test-run.yml index f8f0b3e..758d43e 100644 --- a/.github/workflows/mobile-test-run.yml +++ b/.github/workflows/mobile-test-run.yml @@ -3,7 +3,7 @@ name: Mobile Demo Test Run env: DEVICE_NAME: vividus-test-device ANDROID_EMU_ABI: x86 - ANDROID_EMU_TARGET: android-30 + ANDROID_EMU_TARGET: android-29 ANDROID_EMU_TAG: default IOS_DEVICE_TYPE_ID: iPhone 14 Pro Max @@ -50,6 +50,18 @@ jobs: restore-keys: | tests-history-cache + - name: Spin-up Android emulator + if: matrix.platform == 'Android' + run: | + echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" + echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n "$DEVICE_NAME" -k "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" --force + echo $ANDROID_HOME/emulator/emulator -list-avds + echo "Starting emulator" + $ANDROID_HOME/emulator/emulator -avd "$DEVICE_NAME" -no-snapshot -delay-adb + $ANDROID_HOME/platform-tools/adb wait-for-device + $ANDROID_HOME/platform-tools/adb devices -l + echo "Emulator started" + - name: Spin-up iOS simulator if: matrix.platform == 'iOS' run: xcrun simctl create "$DEVICE_NAME" "$IOS_DEVICE_TYPE_ID" | xargs xcrun simctl boot @@ -95,18 +107,11 @@ jobs: - name: Run Android tests if: matrix.platform == 'Android' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - avd-name: ${{ env.DEVICE_NAME }} - force-avd-creation: false - emulator-options: -no-snapshot -delay-adb - script: | - ./gradlew runStories -Pvividus.configuration.suites=mobile_app/android \ - -Pvividus.configuration.profiles=mobile_app/local2,mobile_app/android \ - -Pvividus.allure.history-directory=output/history/android \ - -Pvividus.selenium.grid.capabilities.deviceName="$DEVICE_NAME" - + run: | + ./gradlew runStories -Pvividus.configuration.suites=mobile_app/android \ + -Pvividus.configuration.profiles=mobile_app/local2,mobile_app/android \ + -Pvividus.allure.history-directory=output/history/android \ + -Pvividus.selenium.grid.capabilities.deviceName="$DEVICE_NAME" - name: Publish ${{ matrix.platform }} tests report if: always() From d77a75b9a36717066fdc975a925b7eedc9db2d13 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 30 Oct 2023 18:15:55 +0200 Subject: [PATCH 4/5] Update mobile-test-run.yml --- .github/workflows/mobile-test-run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mobile-test-run.yml b/.github/workflows/mobile-test-run.yml index 758d43e..34a8c2a 100644 --- a/.github/workflows/mobile-test-run.yml +++ b/.github/workflows/mobile-test-run.yml @@ -56,6 +56,7 @@ jobs: echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n "$DEVICE_NAME" -k "system-images;$ANDROID_EMU_TARGET;$ANDROID_EMU_TAG;$ANDROID_EMU_ABI" --force echo $ANDROID_HOME/emulator/emulator -list-avds + $ANDROID_HOME/platform-tools/adb start-server echo "Starting emulator" $ANDROID_HOME/emulator/emulator -avd "$DEVICE_NAME" -no-snapshot -delay-adb $ANDROID_HOME/platform-tools/adb wait-for-device From 841e2bff99ee906442102df171c63246313cc27c Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 30 Oct 2023 18:37:50 +0200 Subject: [PATCH 5/5] Update mobile-test-run.yml --- .github/workflows/mobile-test-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mobile-test-run.yml b/.github/workflows/mobile-test-run.yml index 34a8c2a..b55d01a 100644 --- a/.github/workflows/mobile-test-run.yml +++ b/.github/workflows/mobile-test-run.yml @@ -58,7 +58,7 @@ jobs: echo $ANDROID_HOME/emulator/emulator -list-avds $ANDROID_HOME/platform-tools/adb start-server echo "Starting emulator" - $ANDROID_HOME/emulator/emulator -avd "$DEVICE_NAME" -no-snapshot -delay-adb + nohup $ANDROID_HOME/emulator/emulator -avd "$DEVICE_NAME" -no-snapshot -delay-adb > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb devices -l echo "Emulator started"