-
Notifications
You must be signed in to change notification settings - Fork 7
110 lines (90 loc) · 2.73 KB
/
ci.yml
File metadata and controls
110 lines (90 loc) · 2.73 KB
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
name: React Native CI
on:
pull_request:
branches: main
push:
branches: main
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
jobs:
ios-build:
name: iOS Build
runs-on: macos-latest
defaults:
run:
working-directory: example
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install dependencies
run: |
npm install --frozen-lockfile
cd ios && pod install
- name: Install Maestro CLI
run: |
export MAESTRO_VERSION=1.39.13; 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 iOS
run: npm run build:ios
- name: Build iOS
run: |
npm run ios:release
- name: Bring simulator to foreground
run: |
open -a simulator
- name: Run iOS tests
run: export MAESTRO_DRIVER_STARTUP_TIMEOUT=190000; npm run test:e2e
android-build:
name: Android Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: example
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: example/package-lock.json
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Bundle Android
run: npm run build:android
- name: Install Maestro CLI
run: |
export MAESTRO_VERSION=1.39.13; curl -Ls "https://get.maestro.mobile.dev" | bash
- name: Add Maestro to path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
- name: Create AVD and generate snapshot for caching
uses: reactivecircus/android-emulator-runner@v2
with:
target: aosp_atd
api-level: 30
arch: x86
ram-size: 4096M
channel: canary
profile: pixel
avd-name: Pixel_3a_API_30_AOSP
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
emulator-boot-timeout: 12000
disable-animations: false
working-directory: example
script: |
npm run android:release
npm run test:e2e