From 9baa6d507cc6e0601d8a1ac0c505a4e84bb48f4b Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 22 Aug 2024 00:12:01 +0800 Subject: [PATCH] Retry --- .github/workflows/test-xharness-android.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-xharness-android.yml b/.github/workflows/test-xharness-android.yml index 3493191..4e70aef 100644 --- a/.github/workflows/test-xharness-android.yml +++ b/.github/workflows/test-xharness-android.yml @@ -60,13 +60,18 @@ jobs: /bl:./artifacts/logs/msbuild-publish.binlog - name: Run Tests run: | - dotnet xharness android test \ - --timeout="00:05:00" \ - --launch-timeout=00:10:00 \ - --package-name com.companyname.DeviceTestingKitApp.DeviceTests \ - --instrumentation devicerunners.xharness.maui.XHarnessInstrumentation \ - --app sample/test/DeviceTestingKitApp.DeviceTests/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/publish/com.companyname.devicetestingkitapp.devicetests-Signed.apk \ - --output-directory artifacts + for i in $(seq 1 3) + do + dotnet xharness android test \ + --timeout="00:05:00" \ + --launch-timeout=00:10:00 \ + --package-name com.companyname.DeviceTestingKitApp.DeviceTests \ + --instrumentation devicerunners.xharness.maui.XHarnessInstrumentation \ + --app sample/test/DeviceTestingKitApp.DeviceTests/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/publish/com.companyname.devicetestingkitapp.devicetests-Signed.apk \ + --output-directory artifacts \ + && code=0 && break || code=$? && sleep 15 + done + exit $code - name: Shutdown the Emulator run: dotnet xharness android adb -- emu kill - name: Upload Artifacts