@@ -9,9 +9,9 @@ branches:
9
9
- /^release\/.*$/
10
10
11
11
stages :
12
- - check
13
12
- test
14
13
- release-rc
14
+ - release-docker
15
15
- test-external
16
16
17
17
node_js :
@@ -38,14 +38,18 @@ addons:
38
38
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
39
39
- dpkg
40
40
chrome : stable
41
+ firefox : latest
41
42
42
43
before_install :
43
44
# prevents windows error: npm ERR! ... git-sh-setup: file not found
44
45
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
45
46
# only run jobs in packages that have changed since master in PR builds
46
47
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi
48
+ # modules with pre-built binaries may not have deployed versions for bleeding-edge node so this lets us fall back to building from source
49
+ - npm install -g node-pre-gyp
47
50
48
- script : npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
51
+ script :
52
+ - npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
49
53
50
54
jobs :
51
55
allow_failures :
@@ -57,84 +61,181 @@ jobs:
57
61
- name : external - orbit-db
58
62
- name : external - ipfs-log
59
63
- name : external - sidetree
64
+
60
65
include :
61
- - stage : check
66
+ # manual install step, we do this to cache the installed files for subsequent steps
67
+ - stage : test
68
+ name : lint
62
69
script :
63
- - npm run build -- $RUN_SINCE --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
64
- - npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
65
70
- npm run lint -- $RUN_SINCE --concurrency 1
66
71
72
+ - stage : test
73
+ name : dep-check
74
+ script :
75
+ - npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
76
+
67
77
- stage : test
68
78
name : chrome
69
- addons :
70
- chrome : stable
71
79
script :
72
80
- npm run test:browser -- $RUN_SINCE -- -- --bail
73
81
74
82
- stage : test
75
83
name : chrome webworker
76
- addons :
77
- chrome : stable
78
84
script :
79
- - npm run test:webworker -- $RUN_SINCE -- -- --bail
85
+ - npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000
80
86
81
87
- stage : test
82
88
name : firefox
83
- addons :
84
- firefox : latest
85
89
script :
86
90
- npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
87
91
88
92
- stage : test
89
93
name : firefox webworker
90
- addons :
91
- firefox : latest
92
94
script :
93
- - npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
95
+ - npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless --timeout 60000
94
96
95
97
- stage : test
96
98
name : electron-main
97
- os : osx
98
99
script :
99
- - npm run test:electron-main -- $RUN_SINCE -- -- --bail
100
+ - npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000
100
101
101
102
- stage : test
102
103
name : electron-renderer
103
- os : osx
104
104
script :
105
- - npm run test:electron-renderer -- $RUN_SINCE -- -- --bail
105
+ - npm run test:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 60000
106
106
107
107
- stage : test
108
108
name : interop - node
109
109
script :
110
- - npm run test:interop:node -- $RUN_SINCE -- -- --bail
110
+ - npm run test:interop -- $RUN_SINCE -- -- -- -t node --bail
111
111
112
112
- stage : test
113
113
name : interop - browser
114
114
script :
115
- - npm run test:interop:browser -- $RUN_SINCE -- -- --bail
115
+ - npm run test:interop -- $RUN_SINCE -- -- -- -t browser --bail
116
116
117
117
- stage : test
118
118
name : interop - electron-main
119
- os : osx
120
119
script :
121
- - npm run test:interop:electron-main -- $RUN_SINCE -- -- --bail --timeout 10000
120
+ - npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js -- bail --timeout 60000
122
121
123
122
- stage : test
124
123
name : interop - electron-renderer
125
- os : osx
126
124
script :
127
- - npm run test:interop:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 10000
125
+ - npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 60000
126
+
127
+ - stage : test
128
+ name : js-ipfs interface tests - node
129
+ script :
130
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node
131
+
132
+ - stage : test
133
+ name : js-ipfs interface tests - chrome
134
+ script :
135
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser
136
+
137
+ - stage : test
138
+ name : js-ipfs interface tests - chrome webworker
139
+ script :
140
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
141
+
142
+ - stage : test
143
+ name : js-ipfs interface tests - firefox
144
+ script :
145
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
146
+
147
+ - stage : test
148
+ name : js-ipfs interface tests - firefox webworker
149
+ script :
150
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
151
+
152
+ - stage : test
153
+ name : js-ipfs interface tests - electron main
154
+ script :
155
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
156
+
157
+ - stage : test
158
+ name : js-ipfs interface tests - electron renderer
159
+ script :
160
+ - npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
161
+
162
+ - stage : test
163
+ name : http-api-client interface tests vs go-ipfs - node
164
+ script :
165
+ - npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node
166
+
167
+ - stage : test
168
+ name : http-api-client interface tests vs go-ipfs - chrome
169
+ script :
170
+ - npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser
171
+
172
+ - stage : test
173
+ name : http-api-client interface tests vs go-ipfs - chrome webworker
174
+ script :
175
+ - npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
176
+
177
+ - stage : test
178
+ name : http-api-client interface tests vs go-ipfs - firefox
179
+ script :
180
+ - npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
181
+
182
+ - stage : test
183
+ name : http-api-client interface tests vs go-ipfs - firefox webworker
184
+ script :
185
+ - npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
186
+
187
+ - stage : test
188
+ name : http-api-client interface tests vs js-ipfs - node
189
+ script :
190
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node
191
+
192
+ - stage : test
193
+ name : http-api-client interface tests vs js-ipfs - chrome
194
+ script :
195
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser
196
+
197
+ - stage : test
198
+ name : http-api-client interface tests vs js-ipfs - chrome webworker
199
+ script :
200
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
201
+
202
+ - stage : test
203
+ name : http-api-client interface tests vs js-ipfs - firefox
204
+ script :
205
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
206
+
207
+ - stage : test
208
+ name : http-api-client interface tests vs js-ipfs - firefox webworker
209
+ script :
210
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
211
+
212
+ - stage : test
213
+ name : http-api-client interface tests vs js-ipfs - electron main
214
+ script :
215
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
216
+
217
+ - stage : test
218
+ name : http-api-client interface tests vs js-ipfs - electron renderer
219
+ script :
220
+ - npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
221
+
222
+ - stage : test
223
+ name : ipfs-message-port-client interface tests - chrome
224
+ script :
225
+ - npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser
226
+
227
+ - stage : test
228
+ name : ipfs-message-port-client interface tests - firefox
229
+ script :
230
+ - npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
128
231
129
232
- stage : test
130
233
name : examples
131
234
script :
132
- - npx json -I -f ./lerna.json -e "this.packages.push('examples/*')"
133
- - npx json -I -f ./lerna.json -e "this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']"
134
- - npm run reset
135
- - npm install
136
- - npm run build -- --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
137
- - npm run test -- --scope=example* --concurrency=1
235
+ # Travis lets scripts continue even if previous steps fail: https://github.com/travis-ci/travis-ci/issues/1066
236
+ - npm run build -- --scope={ipfs-core,ipfs,ipfs-http-client,ipfs-message-port-*} &&
237
+ npm run configure-examples &&
238
+ npm run test -- --scope=example* --concurrency=1
138
239
139
240
- stage : release-rc
140
241
# only run on changes to master
@@ -149,6 +250,19 @@ jobs:
149
250
# only run if the last commit was not part of a release
150
251
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run release:rc ; fi
151
252
253
+ - stage : release-docker
254
+ # only run on changes to master
255
+ if : branch = master AND type = push AND fork = false
256
+ name : release docker
257
+ script :
258
+ # travis does not fetch the whole repo history, but we need that to work out the
259
+ # ref count to publish canary releases properly
260
+ - git fetch --unshallow
261
+ - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
262
+ - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
263
+ # only run if the last commit was not part of a release
264
+ - if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run docker:rc ; fi
265
+
152
266
- stage : test-external
153
267
# only run on changes to master
154
268
if : branch = master AND type = push AND fork = false
0 commit comments