-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
120 lines (120 loc) · 3.63 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
os:
- osx
- linux
env:
- TEST_SUITE=ios
- TEST_SUITE=android
- TEST_SUITE=pc-browser
matrix:
fast_finish: true
exclude:
- os: osx
env: TEST_SUITE=ios
- os: osx
env: TEST_SUITE=android
- os: osx
env: TEST_SUITE=pc-browser
- os: linux
env: TEST_SUITE=ios
- os: linux
env: TEST_SUITE=android
- os: linux
env: TEST_SUITE=pc-browser
include:
- os: osx
env: TEST_SUITE=ios
osx_image: xcode9
language: generic
before_install:
- brew update
- brew install carthage > /dev/null 2>&1
- brew install ios-webkit-debug-proxy > /dev/null 2>&1
- brew install nvm > /dev/null 2>&1
- brew install python3
- pip install virtualenv
- virtualenv env -p python3
- source env/bin/activate
install:
- echo Hello Macaca!
- source $(brew --prefix nvm)/nvm.sh
- nvm install 7
- nvm use 7
- npm i ios-simulator macaca-cli macaca-ios -g
- open -a Simulator --args -CurrentDeviceUDID `ios-simulator -n 'iPhone 6s'` > /dev/null 2>&1
- pip install -r requirements.txt
script:
- macaca server --verbose &
- sleep 10
- python tests/macaca-ios-sample.test.py
- os: linux
env: TEST_SUITE=android
jdk: oraclejdk8
language: android
android:
components:
- tools
- build-tools-25.0.2
- platform-tools
- extra-android-m2repository
- extra-google-android-support
- android-25
sudo: required
addons:
apt:
sources:
- deadsnakes
packages:
- python3.5
before_install:
- export CHROME_BIN=chromium-browser
- wget http://services.gradle.org/distributions/gradle-3.3-all.zip
- unzip gradle-3.3-all.zip > /dev/null
- export GRADLE_HOME=$PWD/gradle-3.3
- export PATH=$GRADLE_HOME/bin:$PATH
- export JAVA_HOME=/usr/lib/jvm/java-8-oracle
- export ANDROID_HOME=/usr/local/android-sdk
- . $HOME/.nvm/nvm.sh
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
install:
- echo Hello Macaca!
- nvm install 7
- nvm use 7
- npm install -g macaca-cli macaca-android
- pip install virtualenv
- virtualenv env -p python3.5
- source env/bin/activate
- pip install -r requirements.txt
script:
- macaca server --verbose &
- sleep 10
- python3 tests/macaca-android-sample.test.py
- os: linux
env:
- TEST_SUITE=pc-browser
language: python
sudo: false
python: 3.5
addons:
apt:
packages:
- xvfb
before_install:
- . $HOME/.nvm/nvm.sh
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1366x768x24 > /dev/null 2>&1 &
install:
- echo Hello Macaca!
- nvm install 7
- nvm use 7
- npm install -g macaca-cli macaca-electron
- pip install -r requirements.txt
script:
- macaca server --verbose &
- sleep 10
- python3 tests/macaca-desktop-sample.test.py