forked from microsoft/ApplicationInsights-node.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (42 loc) · 1.58 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
sudo: required
language: node_js
services:
- docker
env:
- TRAVIS_EXTENDED_METRICS=true
- TRAVIS_EXTENDED_METRICS=false
node_js:
- "node"
- "12"
- "11"
- "10"
- "9"
- "8"
- "8.0.0"
- "7"
- "6"
- "4"
- "0.12"
- "0.11"
- "0.10"
- "iojs"
- "iojs-v1.0.4"
before_install:
- npm install -g [email protected]
# Simulate optionalDevDependency for applicationinsights-native-metrics
- npm uninstall applicationinsights-native-metrics --save-dev
- if [ "$TRAVIS_EXTENDED_METRICS" = "true" ]; then npm install applicationinsights-native-metrics --save-optional || true; fi
script:
- npm test
# Run funcs for LTS releases (currently 6, 8, 10) + current release (12)
- if [ "$TRAVIS_NODE_VERSION" = "12" ]; then npm run functionaltest; fi
- if [ "$TRAVIS_NODE_VERSION" = "10" ]; then npm run functionaltest; fi
- if [ "$TRAVIS_NODE_VERSION" = "8" ]; then npm run functionaltest; fi
# Only run functionals on extended-metrics builds for 8, 10, 12
- if [ "$TRAVIS_NODE_VERSION" = "6" ] && [ "$TRAVIS_EXTENDED_METRICS" != "true" ]; then npm run functionaltest; fi
- if [ "$TRAVIS_NODE_VERSION" = "4" ] && [ "$TRAVIS_EXTENDED_METRICS" != "true" ]; then npm run functionaltest; fi
# latest node8 uses cls-hooked for dependency correlation, while 8.0.0 uses
# plain cls instead, so run funcs for 8.0.0 as well
- if [ "$TRAVIS_NODE_VERSION" = "8.0.0" ] && [ "$TRAVIS_EXTENDED_METRICS" != "true" ]; then npm run functionaltest; fi
# Only run backcompat tests once
- if [ "$TRAVIS_NODE_VERSION" = "4" ] && [ "$TRAVIS_EXTENDED_METRICS" != "true" ]; then npm run backcompattest; fi