CI experiment

Change-Id: I27499c0ba4e06586d41f589fc559a2032f5d9f3e
ben/dropshots
Jose Alcérreca 6 months ago
parent 27c0f21e41
commit 8fbc98fbaf

@ -324,11 +324,13 @@ jobs:
# 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 ; then if ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon ;
then
echo "All screenshot tests passed" echo "All screenshot tests passed"
else else
echo "Verification failed. Recording new reference images" 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 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 "New goldens recorded, no issues"
echo "newgoldens=true" >> $GITHUB_OUTPUT echo "newgoldens=true" >> $GITHUB_OUTPUT
else else

Loading…
Cancel
Save