The action does some script parsing that is breaking the if clause, lets try single line

Change-Id: Icfd4a6fd945393b434c3eb171ddaee376459b0e9
ja/edge-to-edge-dropshots
Jose Alcérreca 6 months ago
parent d4093a5cc2
commit 4c7921322a

@ -322,15 +322,14 @@ jobs:
profile: ${{ matrix.profile }} profile: ${{ matrix.profile }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none 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 # Run tests, if they fail, record screenshots and exit with a failure
script: | script: >
set +e set +e ;
if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon ; then
then echo "All screenshot tests passed" ;
echo "All screenshot tests passed"
else else
echo "Recording new goldens" echo "Recording new goldens" ;
./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace ;
echo "newgoldens=true" >> $GITHUB_OUTPUT echo "newgoldens=true" >> $GITHUB_OUTPUT ;
fi fi
- name: Prevent pushing new screenshots if this is a fork - name: Prevent pushing new screenshots if this is a fork

Loading…
Cancel
Save