/
config.yml
74 lines (71 loc) · 1.87 KB
/
config.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
workflows:
version: 2
node-multi-build:
jobs:
- node-v8
- node-v10
- node-v12
- node-v12-minimal
version: 2
jobs:
node-base: &node-base
docker:
- image: node
steps:
- run:
name: Versions
command: npm version
- checkout
- restore_cache:
keys:
- v2-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
key: v2-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Test
command: npm test
node-v8:
<<: *node-base
docker:
- image: node:8
node-v10:
<<: *node-base
docker:
- image: node:10
node-v12:
<<: *node-base
docker:
- image: node:12
node-v12-minimal:
docker:
- image: node:12
steps:
- run:
name: Versions
command: npm version
- checkout
- restore_cache:
keys:
- v2-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
key: v2-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Install eslint 5
command: |
# We need to execute this command twice because of npm's bug.
# See also: https://npm.community/t/error-node-modules-staging-eslint-e7cf6846-node-modules-eslint
npm install eslint@5.0.0 acorn@6.0.7 --no-save
npm install eslint@5.0.0 acorn@6.0.7 --no-save
- run:
name: Test
command: npm test