forked from microsoft/ApplicationInsights-node.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (28 loc) · 989 Bytes
/
.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
sudo: required
language: node_js
services:
- docker
env:
- TRAVIS_EXTENDED_METRICS=true
- TRAVIS_EXTENDED_METRICS=false
node_js:
- "node"
- "13"
- "12"
- "10"
- "8"
before_install:
- npm install -g npm
# 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 clean
# Build and test
- 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 backcompat tests once
- if [ "$TRAVIS_NODE_VERSION" = "8" ] && [ "$TRAVIS_EXTENDED_METRICS" != "true" ]; then npm run backcompattest; fi