This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
forked from elastic/apm-agent-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
277 lines (253 loc) · 8.08 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
# We don't need sudo as such, but setting sudo: required allows us to run on
# the faster machines which means that the builds complete much faster (in
# about half the time). For comparison, here are two builds on the two
# different machines:
# - With `sudo: false`: https://travis-ci.org/opbeat/opbeat-node/builds/252301998
# - With `sudo: required`: https://travis-ci.org/opbeat/opbeat-node/builds/252302576
sudo: required
language: node_js
services:
- mysql
- mongodb
- redis-server
- postgresql
- elasticsearch
- cassandra
install:
- for i in {1..3}; do travis_wait 5 npm install && break; rm -rf node_modules; done
before_script:
- npm install -g npm@latest
- wait-on tcp:9200
node_js:
- '11'
- '11.0'
- '10'
- '10.0'
- '8'
- '8.1'
- '6'
- '6.0'
jobs:
fast_finish: true
include:
###########################################
# TEST STAGE #
###########################################
# Disable Async Hooks
-
node_js: '11'
env: ELASTIC_APM_ASYNC_HOOKS=false
-
node_js: '10'
env: ELASTIC_APM_ASYNC_HOOKS=false
-
node_js: '8'
env: ELASTIC_APM_ASYNC_HOOKS=false
# Docs
-
script: npm run docs
name: "Build Docs"
perl: '5.26'
# Commit Messages
-
node_js: 'lts/*'
name: "Lint Commit Messages"
script: commitlint-travis
# Coverage
-
node_js: 'lts/*'
name: "Code Coverage"
script:
- npm run coverage
- ./node_modules/.bin/nyc report --reporter=lcov > coverage.lcov
- npm install -g codecov
- codecov
###########################################
# DEPENDENCY STAGE #
###########################################
# Node.js 11
- stage: dependencies
node_js: '11'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=generic-pool,mysql,mysql2,redis,koa-router,handlebars,mongodb-core,finalhandler
script: tav --quiet
-
node_js: '11'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=ioredis,pg,cassandra-driver,restify,fastify
script: tav --quiet
-
node_js: '11'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=mimic-response,got,bluebird,apollo-server-express
script: tav --quiet
-
node_js: '11'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=knex,ws,graphql,express-graphql,elasticsearch,hapi,express,express-queue
script: tav --quiet
# Node.js 10
- stage: dependencies
node_js: '10'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=generic-pool,mysql,mysql2,redis,koa-router,handlebars,mongodb-core,finalhandler
script: tav --quiet
-
node_js: '10'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=ioredis,pg,cassandra-driver,restify,fastify
script: tav --quiet
-
node_js: '10'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=mimic-response,got,bluebird,apollo-server-express
script: tav --quiet
-
node_js: '10'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=knex,ws,graphql,express-graphql,elasticsearch,hapi,express,express-queue
script: tav --quiet
# Node.js 8
-
node_js: '8'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=generic-pool,mysql,mysql2,redis,koa-router,handlebars,mongodb-core,finalhandler
script: tav --quiet
-
node_js: '8'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=ioredis,pg,cassandra-driver,restify,fastify
script: tav --quiet
-
node_js: '8'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=mimic-response,got,bluebird,apollo-server-express
script: tav --quiet
-
node_js: '8'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=knex,ws,graphql,express-graphql,elasticsearch,hapi,express,express-queue
script: tav --quiet
# Node.js 6
-
node_js: '6'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=generic-pool,mysql,mysql2,redis,koa-router,handlebars,mongodb-core,finalhandler
script: tav --quiet
-
node_js: '6'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=ioredis,pg,cassandra-driver,restify,fastify
script: tav --quiet
-
node_js: '6'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=mimic-response,got,bluebird,apollo-server-express
script: tav --quiet
-
node_js: '6'
if: type IN (cron, pull_request) AND NOT branch =~ ^greenkeeper/.*
env: TAV=knex,ws,graphql,express-graphql,elasticsearch,hapi,express,express-queue
script: tav --quiet
###########################################
# NODE.JS PRE-RELEASE STAGE #
###########################################
# Nightlies
- stage: Node.js pre-releases
node_js: '11'
name: "Node.js: 11-nightly"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
-
node_js: '10'
name: "Node.js: 10-nightly"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
-
node_js: '8'
name: "Node.js: 8-nightly"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
-
node_js: '6'
name: "Node.js: 6-nightly"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
# Nightlies - No async hooks
- stage: Node.js pre-releases
node_js: '11'
name: "Node.js: 11-nightly (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
-
node_js: '10'
name: "Node.js: 10-nightly (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
-
node_js: '8'
name: "Node.js: 8-nightly (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
# Release Candidates
-
node_js: '11'
name: "Node.js: 11-rc"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
-
node_js: '10'
name: "Node.js: 10-rc"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
-
node_js: '8'
name: "Node.js: 8-rc"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
-
node_js: '6'
name: "Node.js: 6-rc"
if: type = cron
env: NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
# Release Candidates - No async hooks
-
node_js: '11'
name: "Node.js: 11-rc (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
-
node_js: '10'
name: "Node.js: 10-rc (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
-
node_js: '8'
name: "Node.js: 8-rc (no async hooks)"
if: type = cron
env:
- ELASTIC_APM_ASYNC_HOOKS=false
- NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/
addons:
apt:
packages:
- xsltproc
- libxml2-utils
notifications:
email:
slack:
secure: Jq9ST6TYsZZtPgUdn60rZCfcclNF1cXaCqemt9ZKvqlDie9kbyJjU9t0K+EFdlQXgzM5sGAC+okRO9c29zMDuWvsuY6wb5K2p9j1cxfOn1FTc4xcxh/fKelu1Q7nGaMOIPvQuoI/TQBo4pwACyjli+ohz7DMVMRcans6GR+P0S8=
on_success: change
on_failure: change
on_pull_requests: false