-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (86 loc) · 2.63 KB
/
android.yml
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
name: Android E2E Tests
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- api-level: 28
target: default
arch: x86_64
- api-level: 26
target: google_apis
arch: x86
- api-level: 28
target: google_apis
arch: x86_64
- api-level: 31
target: default
arch: x86_64
- api-level: 33
target: default
arch: x86_64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log runner info
run: npx envinfo
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: |
npm install -g yarn
yarn install
- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: Build Android App
run: |
yarn generate-test-data
yarn expo prebuild --platform android
cd android
./gradlew assembleRelease
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
cores: 4
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
disable-animations: true
script: |
adb devices
adb install android/app/build/outputs/apk/release/app-release.apk
maestro test .maestro/
- name: Upload Maestro artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: maestro-artifacts-api${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }}
path: |
~/.maestro/tests/
/home/runner/.maestro/tests/
/home/runner/.maestro/logs/