Skip to content

Commit b9c08a8

Browse files
committed
change screenshot size
1 parent ab2a77d commit b9c08a8

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/screenshots.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
api-level: [ 34 ]
1615
device:
17-
- pixel_6
18-
- pixel_c
16+
- profile: pixel_6
17+
api-level: 34
18+
display_size: 1080x2336 # subtracted the 64px bottom navigation bar
19+
type: phone
20+
- profile: Pixel Tablet
21+
api-level: 34
22+
display_size: 2560x1488 # subtracted the 64px navigation bar and 48px status bar
23+
type: tenInch
1924
steps:
2025
- name: Enable KVM group perms
2126
run: |
@@ -40,16 +45,16 @@ jobs:
4045
path: |
4146
~/.android/avd/*
4247
~/.android/adb*
43-
key: ${{ runner.os }}-avd-api${{ matrix.api-level }}-${{ matrix.device }}
48+
key: ${{ runner.os }}-avd-api${{ matrix.device.api-level }}-${{ matrix.device.profile }}
4449

4550
- name: create AVD and generate snapshot for caching
4651
if: steps.avd-cache.outputs.cache-hit != 'true'
4752
uses: reactivecircus/android-emulator-runner@v2
4853
with:
49-
api-level: ${{ matrix.api-level }}
54+
api-level: ${{ matrix.device.api-level }}
5055
target: google_atd
5156
arch: x86_64
52-
profile: ${{ matrix.device }}
57+
profile: ${{ matrix.device.profile }}
5358
force-avd-creation: false
5459
ram-size: 2048M
5560
disk-size: 8192M
@@ -77,24 +82,25 @@ jobs:
7782
- name: Run emulator and generate screenshots
7883
uses: reactivecircus/android-emulator-runner@v2
7984
with:
80-
api-level: ${{ matrix.api-level }}
85+
api-level: ${{ matrix.device.api-level }}
8186
target: google_atd
8287
arch: x86_64
83-
profile: ${{ matrix.device }}
88+
profile: ${{ matrix.device.profile }}
8489
force-avd-creation: false
8590
ram-size: 2048M
8691
disk-size: 4096M
8792
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
8893
disable-animations: true
8994
script: |
9095
adb shell pm clear net.vonforst.evmap.debug || true
96+
adb shell wm size ${{ matrix.device.display_size }}
9197
adb logcat -c
9298
9399
adb logcat *:E &
94-
fastlane screengrab --app_apk_path app/build/outputs/apk/googleNormal/debug/app-google-normal-debug.apk --test_apk_path app/build/outputs/apk/androidTest/googleNormal/debug/app-google-normal-debug-androidTest.apk --tests_package_name=net.vonforst.evmap.debug.test --app_package_name net.vonforst.evmap.debug -p net.vonforst.evmap.screenshot --use_timestamp_suffix false --clear_previous_screenshots true -q en-US,de-DE,fr-FR,nb-rNO,nl-NL,pt-PT,ro-RO
100+
fastlane screengrab --app_apk_path app/build/outputs/apk/googleNormal/debug/app-google-normal-debug.apk --test_apk_path app/build/outputs/apk/androidTest/googleNormal/debug/app-google-normal-debug-androidTest.apk --tests_package_name=net.vonforst.evmap.debug.test --app_package_name net.vonforst.evmap.debug -p net.vonforst.evmap.screenshot --use_timestamp_suffix false --clear_previous_screenshots true --device_type=${{ matrix.device.type }} -q en-US,de-DE,fr-FR,nb-rNO,nl-NL,pt-PT,ro-RO
95101
96102
- name: Upload screenshots as artifacts
97103
uses: actions/upload-artifact@v3
98104
with:
99-
name: screenshots-${{ matrix.device }}-${{ matrix.api-level }}
105+
name: screenshots-${{ matrix.device.profile }}-${{ matrix.device.api-level }}
100106
path: fastlane/metadata/android

0 commit comments

Comments
 (0)