|
|
|
@ -328,15 +328,9 @@ jobs:
|
|
|
|
|
then
|
|
|
|
|
echo "All screenshot tests passed"
|
|
|
|
|
else
|
|
|
|
|
echo "Verification failed. Recording new reference images"
|
|
|
|
|
if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace
|
|
|
|
|
then
|
|
|
|
|
echo "New goldens recorded, no issues"
|
|
|
|
|
echo "newgoldens=true" >> $GITHUB_OUTPUT
|
|
|
|
|
else
|
|
|
|
|
echo "Error while recording new goldens"
|
|
|
|
|
exit 5
|
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|