-
Notifications
You must be signed in to change notification settings - Fork 422
84 lines (73 loc) · 2.04 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
name: Android Build
on:
pull_request:
branches:
- master
paths:
- '.github/workflows/android.yml'
- 'android/**'
- 'example/android/**'
push:
branches:
- master
jobs:
android-build:
runs-on: macos-12
concurrency:
group: ${{ github.ref }}-android
cancel-in-progress: true
steps:
- uses: oven-sh/setup-bun@v2
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: bun install
- name: Install example dependencies
shell: bash
run: bun install
working-directory: example
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Install Maestro CLI
run: |
export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash
brew tap facebook/fb
brew install facebook/fb/idb-companion
- name: Add Maestro to path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
- name: Bundle app
run: bun run build:android
working-directory: example
- name: Run Android Emulator and app
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
target: aosp_atd
profile: pixel_2
ram-size: '4096M'
disk-size: '10G'
disable-animations: false
avd-name: e2e_emulator
arch: x86_64
script: |
bun example:android:release
bun test:e2e:android
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: E2E Report
path: |
${{ github.workspace }}/*.mp4
${{ github.workspace }}/*.png
${{ github.workspace }}/report*.xml
~/.maestro/tests/**/*
- name: Store tests result
uses: actions/upload-artifact@v4
with:
name: e2e_android_report
path: |
report.xml