From 5ddcba591efc4ce43d99ad2a7dc2cc6dd03206ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Alc=C3=A9rreca?= Date: Tue, 28 May 2024 10:40:44 +0000 Subject: [PATCH] Restrict screenshot tests to :app Change-Id: I96dc5df1fccac71c42fb0e87997969bdf7b2d5f3 --- .github/workflows/Build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 36197883f..adfedf5b1 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -324,7 +324,7 @@ jobs: # Run tests, if they fail, record screenshots and exit with a failure #TODO: Split the script in multiple lines (note that the action does some parsing that breaks multiline) 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 ; fi + set +e ; if ./gradlew :app:connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon ; then echo "All screenshot tests passed" ; else echo "Recording new goldens" ; ./gradlew :app: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 id: checkfork_screenshots_instrumented