-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (63 loc) · 2.31 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
cache: yarn
jobs:
allow_failures:
- os: linux
- os: osx
include:
- name: 'Build iOS'
os: osx
language: objective-c
osx_image: xcode12
xcode_project: example/ios/magazine.xcodeproj
xcode_scheme: AtInternetExample
xcode_destination: platform=iOS Simulator,OS=14.1,name=iPhone X
env:
- NODE_VERSION="node"
before_install:
- nvm install $NODE_VERSION
- npm install --global yarn
script:
- yarn bootstrap
- yarn test
- yarn example ios
- name: 'Build Android'
language: generic
dist: trusty
os:
- linux
env:
- NODE_VERSION="node"
- SYS=24
- ABI="default;armeabi-v7a"
before_install:
- nvm install $NODE_VERSION
- npm install --global yarn
# Install the Android SDK Dependency.
- export ANDROID_HOME=~/android-sdk-linux
- wget -q "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" -O android-sdk-tools.zip
- unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}
- rm android-sdk-tools.zip
- PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
# Silence warning.
- mkdir -p ~/.android
- touch ~/.android/repositories.cfg
# Accept licenses before installing components, no need to echo y for each component
- yes | sdkmanager --licenses
# Platform tools
- sdkmanager "emulator" "tools" "platform-tools" > /dev/null
- sdkmanager --list
# install older packages (for emulator)
- sdkmanager "build-tools;28.0.3" "platforms;android-28" > /dev/null
# Create and start emulator.
- sdkmanager "system-images;android-$SYS;$ABI" > /dev/null
- sdkmanager --list
- echo no | avdmanager create avd --force -n test -k "system-images;android-$SYS;$ABI"
# use the absolute emulator path in case older version installed (on default path)
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
before_script:
- adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
- adb shell input keyevent 82 &
script:
- yarn bootstrap
- yarn test
- yarn example android