|
|
|
@ -299,14 +299,14 @@ jobs:
|
|
|
|
|
disable-animations: true
|
|
|
|
|
disk-size: 6000M
|
|
|
|
|
heap-size: 600M
|
|
|
|
|
profile: pixel_5
|
|
|
|
|
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: |
|
|
|
|
|
./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon
|
|
|
|
|
|| echo "Recording new screenshots"
|
|
|
|
|
; ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace
|
|
|
|
|
; echo "Done recording new screenshots, exiting with failure"
|
|
|
|
|
./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon \
|
|
|
|
|
|| echo "Recording new screenshots" \
|
|
|
|
|
; ./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests -Pdropshots.record --daemon --stacktrace \
|
|
|
|
|
; echo "Done recording new screenshots, exiting with failure" \
|
|
|
|
|
; exit 5
|
|
|
|
|
|
|
|
|
|
- name: Prevent pushing new screenshots if this is a fork
|
|
|
|
@ -328,3 +328,10 @@ jobs:
|
|
|
|
|
file_pattern: 'app/src/androidTest/screenshots/*.png'
|
|
|
|
|
disable_globbing: true
|
|
|
|
|
commit_message: "🤖 Updates instrumented screenshots. API ${{ matrix.api-level }}"
|
|
|
|
|
|
|
|
|
|
- name: Upload test reports
|
|
|
|
|
if: always()
|
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: test-reports-${{ matrix.profile }}-${{ matrix.api-level }}
|
|
|
|
|
path: '**/build/reports/androidTests'
|
|
|
|
|