forked from faazshift/terraform-npm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
54 lines (47 loc) · 1.19 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
language: node_js
## Git configuration
git:
depth: 5 # limit clone depth
submodules: false
## Enable caching
cache:
yarn: true
directories:
- node_modules
## Custom job 'definitions'
definitions:
local-test: &local-test
stage: Local test
install: yarn
script:
- echo "Running local test against $(node -v)..."
- yarn test
global-test: &global-test
stage: Global test
install:
- BRANCH="$TRAVIS_PULL_REQUEST_BRANCH"
- if [ "$BRANCH" == "" ]; then BRANCH="$TRAVIS_BRANCH"; fi
- yarn global add "https://github.com/$TRAVIS_REPO_SLUG#$BRANCH"
script:
- echo "Running global test against $(node -v)..."
- yarn test-global
# Attempt to skip Git cloning (doesn't work as of 02-06-18)
# branches
# - only: ""
## Build stages
jobs:
include:
## Local tests (with differing Node versions)
- <<: *local-test
node_js: "node"
- <<: *local-test
node_js: "stable"
- <<: *local-test
node_js: "lts/*"
## Global tests (with differing Node versions)
- <<: *global-test
node_js: "node"
- <<: *global-test
node_js: "stable"
- <<: *global-test
node_js: "lts/*"