-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.88 KB
/
android-detox-test.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
name: Android Detox Test
on:
schedule:
- cron: 0 7 * * *
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v3
- name: Use specific Java version for sdkmanager to work
uses: joschi/setup-jdk@v1
with:
java-version: 'openjdk8'
architecture: 'x64'
- name: Use Node.js 16.17.0
uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Download Android Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-29;google_apis;x86"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-29;google_apis;x86'
$ANDROID_HOME/emulator/emulator -list-avds
- name: Yarn Install, Build, (Test)
run: |
sh prepare_qa.sh
yarn install --frozen-lockfile
- name: Build for detox
run: |
yarn build-detox-android
- name: Android Emulator
timeout-minutes: 10
continue-on-error: true
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd emu -no-audio -no-snapshot -no-window &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: Android Detox
run: yarn start & yarn test-detox-android