Added screenshot test for SearchScreenUI #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: androidTest | |
on: | |
pull_request: | |
branches: [ '*' ] | |
push: | |
branches: [ master, v0.3.0 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: gradle-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: gradle-cache-${{ runner.os }}- | |
- name: Cache AVD | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-cache-${{ runner.os }}-${{ hashFiles('**/*.avd') }} | |
restore-keys: avd-cache-${{ runner.os }}- | |
- name: Create Android Virtual Device and run all tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
id: testing | |
with: | |
api-level: 29 | |
target: google_apis | |
arch: arm64-v8a | |
force-avd-creation: true | |
emulator-options: -wipe-data -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: | | |
./gradlew testDebugUnitTest validateDebugScreenshotTest connectedDebugAndroidTest --stacktrace | |
- name: Upload Failing Test Report Log | |
if: steps.testing.outcome != 'success' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs | |
path: app/emulator.log | |
- name: Upload build outputs (APKs) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-outputs | |
path: ./app/build/outputs | |
- name: Upload build reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-reports | |
path: ./app/build/reports | |