-
Notifications
You must be signed in to change notification settings - Fork 1
128 lines (108 loc) · 3.7 KB
/
android-buildjet-ubuntu-amd64.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Android E2E (BuildJet AMD64)
on: [push, pull_request]
jobs:
run_android_e2e:
timeout-minutes: 10
runs-on: buildjet-2vcpu-ubuntu-2204 # See: https://buildjet.com/for-github-actions/docs/getting-started/run-your-first-workflow
strategy:
fail-fast: false
max-parallel: 5
matrix:
arch: [x86, x86_64]
# ^^^ `runs-on: buildjet-2vcpu-ubuntu-2204` doesn't support `arm64-v8a`
api-level: [26, 27, 28, 29, 30, 31, 32, 33, 34]
# ^^^ `21` is the minimum API level supported by React Native
# [21, 22, 23, 24, 25,] - didn't work with Maestro
target: [default, google_apis, google_apis_playstore]
exclude:
# Exclude combinations that are not supported by the Android SDK
# Print all available Android emulators: `sdkmanager --list --verbose | grep system-images`
# x85
- arch: x86
api-level: 31
- arch: x86
api-level: 32
- arch: x86
api-level: 33
- arch: x86
api-level: 34
# default
- target: default
api-level: 30
arch: x86
- target: default
api-level: 31
arch: x86
- target: default
api-level: 32
- target: default
api-level: 33
- target: default
api-level: 34
# google_apis
- target: google_apis
api-level: 27
arch: x86_64
# google_apis_playstore
- target: google_apis_playstore
api-level: 21
- target: google_apis_playstore
api-level: 22
- target: google_apis_playstore
api-level: 23
- target: google_apis_playstore
api-level: 24
arch: x86_64
- target: google_apis_playstore
api-level: 25
arch: x86_64
- target: google_apis_playstore
api-level: 26
arch: x86_64
- target: google_apis_playstore
api-level: 27
arch: x86_64
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: 600 # 10min
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: |
npx envinfo # check memory usage
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/**/*