diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index abb3e28..b1891ba 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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 @@ -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 @@ -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' @@ -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 diff --git a/tests/src/androidTest/assets/MatchesActivityScreenshot.png b/tests/src/androidTest/assets/MatchesActivityScreenshot.png index 34fa767..b6ec16c 100644 Binary files a/tests/src/androidTest/assets/MatchesActivityScreenshot.png and b/tests/src/androidTest/assets/MatchesActivityScreenshot.png differ diff --git a/tests/src/androidTest/assets/MatchesFullScreenshot.png b/tests/src/androidTest/assets/MatchesFullScreenshot.png index 25fd285..a37c75c 100644 Binary files a/tests/src/androidTest/assets/MatchesFullScreenshot.png and b/tests/src/androidTest/assets/MatchesFullScreenshot.png differ diff --git a/tests/src/androidTest/assets/MatchesViewScreenshot.png b/tests/src/androidTest/assets/MatchesViewScreenshot.png index 2dda90b..415c49c 100644 Binary files a/tests/src/androidTest/assets/MatchesViewScreenshot.png and b/tests/src/androidTest/assets/MatchesViewScreenshot.png differ