forked from ipfs/js-ipfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
363 lines (300 loc) · 12.7 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
language: node_js
services:
- xvfb
branches:
only:
- master
- /^release\/.*$/
stages:
- test
- release-rc
- release-docker
- test-external
node_js:
- 'lts/*'
- 'node'
os:
- linux
- osx
- windows
env:
# This stops Windows builds from hanging
# https://travis-ci.community/t/timeout-after-build-finished-and-succeeded/1336
- YARN_GPG=no
addons:
apt:
packages:
# Fixes error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
# https://github.com/electron/electron/issues/1518
- libgconf-2-4
# Ensure chrome is the latest version
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
- dpkg
chrome: stable
firefox: latest
before_install:
# prevents windows error: npm ERR! ... git-sh-setup: file not found
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
# only run jobs in packages that have changed since master in PR builds
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi
# modules with pre-built binaries may not have deployed versions for bleeding-edge node so this lets us fall back to building from source
- npm install -g node-pre-gyp
script:
- npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
jobs:
allow_failures:
- name: external - ipfs-webui
- name: external - ipfs-companion
- name: external - npm-on-ipfs
- name: external - peer-base
- name: external - service-worker-gateway
- name: external - orbit-db
- name: external - ipfs-log
- name: external - sidetree
include:
# manual install step, we do this to cache the installed files for subsequent steps
- stage: test
name: lint
script:
- npm run lint -- $RUN_SINCE --concurrency 1
- stage: test
name: dep-check (production deps)
script:
- npm run dep-check -- $RUN_SINCE -- -- -p
- stage: test
name: dep-check (unused deps)
script:
- npm run dep-check -- $RUN_SINCE -- -- -- --unused
- stage: test
name: chrome
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail
- stage: test
name: chrome webworker
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000
- stage: test
name: firefox
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
- stage: test
name: firefox webworker
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless --timeout 60000
- stage: test
name: electron-main
script:
- npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000
- stage: test
name: electron-renderer
script:
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 60000
- stage: test
name: interop - node
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t node --bail
- stage: test
name: interop - browser
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t browser --bail
- stage: test
name: interop - electron-main
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js --bail --timeout 60000
- stage: test
name: interop - electron-renderer
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 60000
- stage: test
name: js-ipfs interface tests - node
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node
- stage: test
name: js-ipfs interface tests - chrome
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser
- stage: test
name: js-ipfs interface tests - chrome webworker
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
- stage: test
name: js-ipfs interface tests - firefox
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- stage: test
name: js-ipfs interface tests - firefox webworker
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
- stage: test
name: js-ipfs interface tests - electron main
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
- stage: test
name: js-ipfs interface tests - electron renderer
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
- stage: test
name: js-ipfs interface tests - ipfs-client - node
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t node
- stage: test
name: js-ipfs interface tests - ipfs-client - chrome
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser
- stage: test
name: js-ipfs interface tests - ipfs-client - chrome webworker
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
- stage: test
name: js-ipfs interface tests - ipfs-client - firefox
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- stage: test
name: js-ipfs interface tests - ipfs-client - firefox webworker
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
- stage: test
name: js-ipfs interface tests - ipfs-client - electron main
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
- stage: test
name: js-ipfs interface tests - ipfs-client - electron renderer
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
- stage: test
name: http-api-client interface tests vs go-ipfs - node
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node
- stage: test
name: http-api-client interface tests vs go-ipfs - chrome
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser
- stage: test
name: http-api-client interface tests vs go-ipfs - chrome webworker
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
- stage: test
name: http-api-client interface tests vs go-ipfs - firefox
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- stage: test
name: http-api-client interface tests vs go-ipfs - firefox webworker
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
- stage: test
name: http-api-client interface tests vs js-ipfs - node
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node
- stage: test
name: http-api-client interface tests vs js-ipfs - chrome
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser
- stage: test
name: http-api-client interface tests vs js-ipfs - chrome webworker
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
- stage: test
name: http-api-client interface tests vs js-ipfs - firefox
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- stage: test
name: http-api-client interface tests vs js-ipfs - firefox webworker
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
- stage: test
name: http-api-client interface tests vs js-ipfs - electron main
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
- stage: test
name: http-api-client interface tests vs js-ipfs - electron renderer
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
- stage: test
name: ipfs-message-port-client interface tests - chrome
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser
- stage: test
name: ipfs-message-port-client interface tests - firefox
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- stage: test
name: examples
script:
# Travis lets scripts continue even if previous steps fail: https://github.com/travis-ci/travis-ci/issues/1066
- npm run build -- --scope={ipfs-core,ipfs,ipfs-http-client,ipfs-message-port-*} &&
npm run configure-examples &&
npm run test -- --scope=example* --concurrency=1
- stage: release-rc
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: release rc
script:
# travis does not fetch the whole repo history, but we need that to work out the
# ref count to publish canary releases properly
- git fetch --unshallow
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# only run if the last commit was not part of a release
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run release:rc ; fi
- stage: release-docker
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: release docker
script:
# travis does not fetch the whole repo history, but we need that to work out the
# ref count to publish canary releases properly
- git fetch --unshallow
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# only run if the last commit was not part of a release
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run docker:rc ; fi
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-webui
script:
- E2E_IPFSD_TYPE=js npm run test:external -- -- -- https://github.com/ipfs-shipyard/ipfs-webui.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-companion
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/ipfs-companion.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - npm-on-ipfs
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/npm-on-ipfs.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - peer-base
script:
- npm run test:external -- -- -- https://github.com/achingbrain/peer-base.git --branch upgrade-to-latest-ipfs-rc --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - service-worker-gateway
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/service-worker-gateway.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - orbit-db
script:
- npm run test:external -- -- -- https://github.com/orbitdb/orbit-db.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-log
script:
- npm run test:external -- -- -- https://github.com/orbitdb/ipfs-log.git --deps=ipfs@next
- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - sidetree
script:
- npm run test:external -- -- -- https://github.com/decentralized-identity/sidetree.git --deps=ipfs@next
notifications:
email: false