From 4c7921322abbd9b18e65bbf6f5f27efb432185f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Alc=C3=A9rreca?= Date: Tue, 28 May 2024 07:54:30 +0000 Subject: [PATCH] The action does some script parsing that is breaking the if clause, lets try single line Change-Id: Icfd4a6fd945393b434c3eb171ddaee376459b0e9 --- .github/workflows/Build.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 635a00362..a3737a17d 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -322,15 +322,14 @@ jobs: 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: | - set +e - if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon - then - echo "All screenshot tests passed" + script: > + set +e ; + if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon ; then + echo "All screenshot tests passed" ; else - echo "Recording new goldens" - ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace - echo "newgoldens=true" >> $GITHUB_OUTPUT + echo "Recording new goldens" ; + ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace ; + echo "newgoldens=true" >> $GITHUB_OUTPUT ; fi - name: Prevent pushing new screenshots if this is a fork