-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
132 lines (128 loc) · 5.62 KB
/
.travis.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
language: node_js
node_js: 12
cache:
directories:
- test/node_modules
- test/android/build
- test/ios/build
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
matrix:
include:
- language: objective-c
os: osx
osx_image: xcode10.2
env:
- REACT_NATIVE_VERSION=0.59.4
PATH=$PATH:~/Library/Python/2.7/bin
install:
- npm install -g react-native-cli
- npm install -g detox-cli
- export CODE_SIGNING_REQUIRED=NO
- brew tap wix/brew
- brew install applesimutils --HEAD
- npm install
- cd test
- npm install
- detox build --configuration ios.sim.release
script:
- CONF=ios.sim.release npx mocha Detox_helper_test.js
- language: android
env:
- REACT_NATIVE_VERSION=0.59.4
- ADB_INSTALL_TIMEOUT=8
- ABI=x86_64
- API=26
- EMU_FLAVOR=default # use google_apis flavor if no default flavor emulator
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
android:
components:
- tools
- platform-tools
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- sys-img-x86-android-26
- sys-img-x86-android-28
install:
- yes | sdkmanager "platforms;android-28"
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager "cmake;3.6.4111459"
- echo y | sdkmanager --channel=3 --channel=1 "cmake;3.10.2.4988404"
- echo y | sdkmanager "lldb;3.1"
- echo y | sdkmanager "build-tools;28.0.3" >/dev/null # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "platforms;android-$API" >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-28" >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
- echo y | sdkmanager --channel=4 "emulator" >/dev/null # Use canary channel to get emulator 29.x for x86_64 image support
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;$EMU_FLAVOR;$ABI" >/dev/null # install our emulator
- echo no | avdmanager create avd --force -n android -k "system-images;android-$API;$EMU_FLAVOR;$ABI" -c 10M
- cat test/android.config.ini >> $HOME/.android/avd/android.avd/config.ini
- emulator -verbose -avd android -no-accel -no-snapshot -no-window -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- "export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle"
- npm install
- cd test
- npm install
script:
- CONF=android.example.ci npx mocha Detox_example_test.js
allow_failures:
- language: android
env:
- REACT_NATIVE_VERSION=0.59.4
- ADB_INSTALL_TIMEOUT=8
- ABI=x86_64
- API=26
- EMU_FLAVOR=default # use google_apis flavor if no default flavor emulator
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- sys-img-x86-android-26
- sys-img-x86-android-28
install:
- yes | sdkmanager "platforms;android-28"
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager "cmake;3.6.4111459"
- echo y | sdkmanager --channel=3 --channel=1 "cmake;3.10.2.4988404"
- echo y | sdkmanager "lldb;3.1"
- echo y | sdkmanager "build-tools;28.0.3" >/dev/null # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "platforms;android-$API" >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-28" >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
- echo y | sdkmanager --channel=4 "emulator" >/dev/null # Use canary channel to get emulator 29.x for x86_64 image support
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;$EMU_FLAVOR;$ABI" >/dev/null # install our emulator
- echo no | avdmanager create avd --force -n android -k "system-images;android-$API;$EMU_FLAVOR;$ABI" -c 10M
- cat test/android.config.ini >> $HOME/.android/avd/android.avd/config.ini
- emulator -verbose -avd android -no-accel -no-snapshot -no-window -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- "export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle"
- npm install -g react-native-cli
- npm install -g detox-cli
- npm install
- cd test
# Workaround until react android issue will be fixed - react-native: 0.55
- mv node_modules/react-native/ReactAndroid/release.gradle node_modules/react-native/ReactAndroid/release.gradle.bak
- cp extras/release.gradle node_modules/react-native/ReactAndroid/
- npm install
- npm run packager &
- detox build --configuration android.emu.ci
script:
- CONF=android.emu.ci npx mocha Detox_helper_test.js
before_install:
- nvm install 12