This repository was archived by the owner on Jun 15, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 112
68 lines (55 loc) · 2.25 KB
/
e2e.yml
File metadata and controls
68 lines (55 loc) · 2.25 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
name: e2e
on: [workflow_dispatch]
jobs:
android:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Download Android Emulator Image
run: |
$ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;default;x86_64"
$ANDROID_HOME/tools/bin/avdmanager create avd -n pixel -d "Nexus 5X" --package "system-images;android-28;default;x86_64"
- name: Install Dependencies
run: yarn install
- name: Add usesCleartextTraffic to release AndroidManifest.xml
run: yarn replace-in-file '<application' '<application android:usesCleartextTraffic="true"' ./android/app/src/main/AndroidManifest.xml
- name: Build for detox
env:
DETOX_CI: true
run: yarn detox build --configuration android.emu.release
- name: Setup Emulator
timeout-minutes: 10
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd pixel -no-audio -no-snapshot -no-window -gpu swiftshader_indirect &
$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 shell settings put global window_animation_scale 0 &
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0 &
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0 &
echo "Emulator started"
- name: Run tests
run: yarn detox test --configuration android.emu.release
ios:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Dependencies
run: yarn install
- name: Install Pods
run: npx pod-install ios
- name: Install detox dependencies
run: brew tap wix/brew
- name: Install simulator utils
run: brew install applesimutils
- name: Build for detox
run: yarn detox build --configuration ios.sim.release
- name: Run tests
run: yarn detox test --configuration ios.sim.release