From 9531cfb561f06218c431f0d8b678c1f8b5974c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Alc=C3=A9rreca?= Date: Fri, 24 May 2024 13:48:42 +0000 Subject: [PATCH] CI fixes Change-Id: I59026e019dd204fb1c11c279394b090d43fadd44 --- .github/workflows/Build.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 3f3524112..7902c7f24 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -299,14 +299,14 @@ jobs: disable-animations: true disk-size: 6000M heap-size: 600M - profile: pixel_5 + profile: ${{ matrix.profile }} emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none # Run tests, if they fail, record screenshots and exit with a failure script: | - ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon - || echo "Recording new screenshots" - ; ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace - ; echo "Done recording new screenshots, exiting with failure" + ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon \ + || echo "Recording new screenshots" \ + ; ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace \ + ; echo "Done recording new screenshots, exiting with failure" \ ; exit 5 - name: Prevent pushing new screenshots if this is a fork @@ -328,3 +328,10 @@ jobs: file_pattern: 'app/src/androidTest/screenshots/*.png' disable_globbing: true commit_message: "🤖 Updates instrumented screenshots. API ${{ matrix.api-level }}" + + - name: Upload test reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-reports-${{ matrix.profile }}-${{ matrix.api-level }} + path: '**/build/reports/androidTests'