From 9152c39c732ff14c3909f74a78e7714fda0aeab2 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 9 Nov 2021 18:33:57 +0000 Subject: [PATCH] adding logcat output to the sanity artifacts --- .github/workflows/sanity_test.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sanity_test.yml b/.github/workflows/sanity_test.yml index aed3e70c72..53b70276c5 100644 --- a/.github/workflows/sanity_test.yml +++ b/.github/workflows/sanity_test.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - api-level: [29] + api-level: [ 29 ] steps: - uses: actions/checkout@v2 with: @@ -56,14 +56,24 @@ jobs: java-version: '11' - name: Run sanity tests on API ${{ matrix.api-level }} uses: reactivecircus/android-emulator-runner@v2 + continue-on-error: true # allow pipeline to upload failure results with: emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none api-level: ${{ matrix.api-level }} + emulator-build: 7425822 # workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160 script: | adb root + adb logcat -c + touch emulator.log + chmod 777 emulator.log + adb logcat >> emulator.log & ./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedGplayDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest || adb pull storage/emulated/0/Pictures/failure_screenshots - - uses: actions/upload-artifact@v2 - with: - name: failure-screenshots - path: failure_screenshots + - name: Upload Failing Test Report Log + if: failure() + uses: actions/upload-artifact@v2 + with: + name: sanity-error-results + path: | + emulator.log + failure_screenshots/