Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
with:
api-level: 31
arch: x86_64
Expand All @@ -153,8 +153,8 @@ jobs:

- name: Run instrumentation tests
id: screenshotsverify
continue-on-error: false
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
continue-on-error: true
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
with:
api-level: 31
arch: x86_64
Expand All @@ -176,14 +176,14 @@ jobs:
continue-on-error: true
if: steps.screenshotsverify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
echo "Pulling $(ls -1q tests/build/test-results/dropshots/reference/*.png | wc -l) files..."
ls -1q tests/build/test-results/dropshots/reference/*.png
cp tests/build/test-results/dropshots/reference/*.png tests/integration-test/src/androidTest/assets/
echo "Pulling $(ls -1q tests/build/test-results/dropshots/DebugAndroidTest/reference/*.png | wc -l) files..."
ls -1q tests/build/test-results/dropshots/DebugAndroidTest/reference/*.png
cp tests/build/test-results/dropshots/DebugAndroidTest/reference/*.png tests/src/androidTest/assets/

# Since commits from actions don't trigger new actions, we validate the new screenshots here
# before we commit them to ensure there isn't flakiness in the tests.
- name: Validate updated screenshots
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
if: steps.screenshotsverify.outcome == 'failure' && steps.screenshotspull.outcome == 'success'
with:
api-level: 31
Expand All @@ -195,7 +195,7 @@ jobs:
script: ./gradlew connectedCheck --stacktrace

- name: Push new screenshots if available
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
if: steps.screenshotspull.outcome == 'success'
with:
file_pattern: '*/*.png'
Expand All @@ -212,6 +212,9 @@ jobs:
with:
name: instrumentation-test-report
path: instrumentation-test-build-reports.zip
- name: Fail if tests failed
if: steps.screenshotsverify.outcome == 'failure'
run: exit 1

publish:
runs-on: ubuntu-latest
Expand Down
Binary file modified tests/src/androidTest/assets/MatchesActivityScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/src/androidTest/assets/MatchesFullScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/src/androidTest/assets/MatchesViewScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.