This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.travis.yml
317 lines (263 loc) · 10.6 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
language: node_js
services:
- xvfb
branches:
only:
- master
- /^release\/.*$/
stages:
- test
- release-rc
- 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
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
script:
- npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
- 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
os: osx
script:
- npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000
- stage: test
name: electron-renderer
os: osx
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
os: osx
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js --bail --timeout 60000
- stage: test
name: interop - electron-renderer
os: osx
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
os: osx
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
- stage: test
name: js-ipfs interface tests - electron renderer
os: osx
script:
- npm run test:interface:core -- $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
os: osx
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
os: osx
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:
- npx json -I -f ./lerna.json -e "this.packages.push('examples/*')"
- npx json -I -f ./lerna.json -e "this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']"
- npm run reset
- npm install
- npm run build -- --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
- 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: 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