-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (65 loc) · 2.33 KB
/
android-github-actions-ubuntu.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Android E2E (Github Actions Ubuntu)
on: [push, pull_request]
jobs:
run_android_e2e:
timeout-minutes: 90
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix: # only these combinations work stable on `ubuntu-*`:
api-level: [26, 27, 28]
arch: [x86, x86_64]
target: [default]
# Print all available Android emulators: `sdkmanager --list --verbose | grep system-images`
include:
- api-level: 26
target: google_apis
arch: x86
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- run: npx envinfo
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Install Maestro
run: MAESTRO_VERSION=1.30.4 curl -Ls 'https://get.maestro.mobile.dev' | bash
- name: Run Maestro E2E tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
cores: 2
ram-size: 2048M
force-avd-creation: false
emulator-boot-timeout: 900 # 15min
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
pre-emulator-launch-script: |
echo "Running pre emulator launch script. Printing the working directory now:"
pwd
script: |
# check memory usage
npx envinfo
# verify emulator is running
adb devices
# Install app
adb install app-release.apk || (adb kill-server && adb start-server && adb devices && adb install app-release.apk)
# Run e2e
./run_android_e2e.sh
# ^^^ Will debug files: report*.xml, video_record.mp4, last_img.png
- name: Upload report
if: always()
uses: actions/upload-artifact@v3
with:
name: E2E Report (${{ matrix.arch }}, ${{ matrix.api-level }}, ${{ matrix.target }})
path: |
${{ github.workspace }}/*.mp4
${{ github.workspace }}/*.png
${{ github.workspace }}/report*.xml
~/.maestro/tests/**/*