Issue#104 Create Test verifying screenshot pulling works

This commit is contained in:
Gergely Hegedus 2022-07-13 21:33:45 +03:00
parent 69f5f15c3a
commit bae8c0fc96
8 changed files with 212 additions and 80 deletions

55
.github/workflows/screenshot-tests.yml vendored Normal file
View file

@ -0,0 +1,55 @@
name: Verify Screenshots can be created and pulled
on:
pull_request:
branches:
- develop
env:
GITHUB_USERNAME: "fknives"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
run-screenshot-test-on-emulator:
runs-on: macos-latest
strategy:
matrix:
api-level: [ 21, 23, 24, 26, 28, 29, 30, 31 ]
fail-fast: false
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
arch: 'x86_64'
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2
with:
arch: 'x86_64'
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./pullscreenshottest.sh