forked from appium/appium-xcuitest-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
208 lines (195 loc) · 6.45 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
sudo: required
os: osx
osx_image: xcode10.1
language: node_js
node_js: "8"
env:
global:
- PLATFORM_VERSION=12.1
- _FORCE_LOGS=1
- RECURSIVE=--recursive
- MAX_PARALLEL=0
- DEBUG=mocha-parallel-tests
- secure: ls4nb5gcu0USHauJOkB9R5p86PMPJd/wCIQWjj/bhAfLNpSNNthtss2Ss9M7BjJg8lth8c85MrGfkAZOGgXknNtlQ2HHwKK4fbEiLAKLDS9diac6/OpAsxxE1/OvletYhkKLQSqb8d5Ju3S/xY6SmNDIzHUpeTYV2/5Ve+7Fh9zc1RztxsPwV1vxPtL6w0IAzNS9PQOmDXQ6x9KuZModtR7ohVKD47A91MzBlu3kk1CSaeQ4I8l7eXi4R9J6F81jkr51Vzoam4B6+4HTepSdfo02irBQWzaJ3VtRCbazFRBc/wfe4YgOPQTD9k69FiP19sa28lP9eSn6h5OCSXA9M803kju33Ml6OItRWDG0gUG1dzTroVXELEIcfnw1iTsFqKWoJLaEzEiXV8n2RsXLaLC5SHPgKwGEigGMfWDxM9leIC8hgervjQvApmx7btzq9S50tMcrzba5qwXDDrjJi1wKSjd4pQajhSj9VgOH9D5ihZBdn++VLwEvfAd4yQhjdsr9+COV1HrgK7Ro1HAHWgGnPtwBKiQdVU20QdQzNrhRdF2MLrJ4BfWpNm92JwlPxP/ojuA2l8mr9nDqlfBgXlnG32j59988gi85vaMfXssrUXtdJqsKJckI01c/mgaRh9pvG3UPX8K39quKBI5ftS8aCCa8tbF6bLq/ZuI2TRU=
jobs:
include:
- stage: tests
if: type != cron
osx_image: xcode10.1
env: TEST=unit COVERALLS=1 _FORCE_LOGS=0
- stage:
if: type != cron
env: CI_METRICS=1 TEST=functional/basic
- stage:
if: type != cron
env: TEST=functional/driver
- stage:
if: type != cron
env: CI_METRICS=1 TEST=functional/web
- stage:
if: type != cron
env: CI_METRICS=1 TEST=functional/long
- stage: # smoke test on xcode 10 web
if: type != cron
osx_image: xcode10
env: CI_METRICS=1 PLATFORM_VERSION=12.0 TEST=functional/web
- stage: # smoke test on xcode 9.4 web
if: type != cron
osx_image: xcode9.4
env: CI_METRICS=1 PLATFORM_VERSION=11.4 TEST=functional/web
- stage: "[CRON] Upload Appium build to Sauce Storage"
if: type = cron
os: linux
env: CLOUD=1
script: $(npm bin)/gulp sauce-storage-upload
# Sauce Emusim tests
- stage: "[CRON] Sauce Emusim tests"
if: type = cron
os: linux
name: Basic, device 0
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=0 TEST=functional/basic
- stage:
if: type = cron
os: linux
name: Basic, device 1
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=1 TEST=functional/basic
- stage:
if: type = cron
os: linux
name: Basic, device 2
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=2 TEST=functional/basic
- stage:
if: type = cron
os: linux
name: Basic, device 3
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=3 TEST=functional/basic
- stage:
if: type = cron
os: linux
name: Basic, device 4
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=4 TEST=functional/basic
- stage:
if: type = cron
os: linux
name: Web, device 0
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=0 TEST=functional/web
addons: &sc
sauce_connect:
no_ssl_bump_domains: localhost
- stage:
if: type = cron
os: linux
name: Web, device 1
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=1 TEST=functional/web
addons:
*sc
- stage:
if: type = cron
os: linux
name: Web, device 2
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=2 TEST=functional/web
addons:
*sc
- stage:
if: type = cron
os: linux
name: Web, device 3
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=3 TEST=functional/web
addons:
*sc
- stage:
if: type = cron
os: linux
name: Web, device 4
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=4 TEST=functional/web
addons:
*sc
- stage:
if: type = cron
os: linux
name: Long, device 0
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=0 LONG=1 TEST=functional/long
- stage:
if: type = cron
os: linux
name: Long, device 1
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=1 LONG=1 TEST=functional/long
- stage:
if: type = cron
os: linux
name: Long, device 2
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=2 LONG=1 TEST=functional/long
- stage:
if: type = cron
os: linux
name: Long, device 3
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=3 LONG=1 TEST=functional/long
- stage:
if: type = cron
os: linux
name: Long, device 4
env: CLOUD=1 SAUCE_EMUSIM_DEVICE_INDEX=4 LONG=1 TEST=functional/long
# - stage: "[CRON] Sauce RDC Tests"
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=0 TEST=functional/basic
# - stage:
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=1 TEST=functional/basic
# - stage:
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=0 TEST=functional/web
# - stage:
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=1 TEST=functional/web
# - stage:
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=0 TEST=functional/long
# - stage:
# if: type = cron
# os: linux
# env: CLOUD=1 SAUCE_RDC_DEVICE_INDEX=1 TEST=functional/long
git:
submodules: false
before_install:
# Use sed to replace the SSH URL with the public URL, then initialize submodules
# code from http://stackoverflow.com/a/24600210/375688
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
sed -i '' 's/[email protected]:/https:\/\/github.com\//' /Users/travis/build/appium/appium-xcuitest-driver/.gitmodules;
git submodule update --init --recursive;
fi
install:
- npm --version
- node --version
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
npm install;
npm install --no-save mjpeg-consumer;
else
npm install --production;
npm install --no-save gulp appium-gulp-plugins chai chai-as-promised chai-subset wd unzip mocha mocha-parallel-tests;
npm install --no-save saucelabs;
$(npm bin)/gulp fix-mocha-parallel-tests;
npm run build;
$(npm bin)/gulp periodic-output & export LONG_PID=$!;
fi
script:
- if [ -n "$CLOUD" ]; then
npm run mocha:parallel -- --max-parallel $MAX_PARALLEL --debug -t 480000 --require build/test/env/env --recursive build/test/$TEST;
else
npm run lint && npm run mocha -- -t 480000 $RECURSIVE build/test/$TEST -g @skip-ci -i --exit;
fi
after_script:
- if [-n "$LONG_PID" ]; then
kill $LONG_PID;
fi
after_success:
- if [ -n "$CI_METRICS" ]; then
mkdir -p ./ci-metrics && ls -la ./ci-metrics;
npm install -g appium-event-parser;
appium-event-parser -s -i ./ci-metrics;
fi
- if [ ${COVERALLS} = "1" ]; then npm run coverage; fi