-
Notifications
You must be signed in to change notification settings - Fork 33
/
config.yml
64 lines (62 loc) · 1.46 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
version: 2.1
workflows:
node-tests:
jobs:
- unit-tests:
name: node14
version: "14.0"
- unit-tests:
name: node16
version: "16.0"
requires:
- node14
- unit-tests:
name: node18
version: "18.0"
requires:
- node16
- unit-tests:
name: node20
version: "20.0"
requires:
- node18
- unit-tests:
name: node21
version: "21.0"
requires:
- node20
jobs:
unit-tests:
parameters:
version:
type: string
docker:
- image: cimg/node:<< parameters.version >>
steps:
- checkout
- run:
name: Node Version
command: |
echo "node: $(node --version)"
- when:
condition:
matches: { pattern: "14.0", value: << parameters.version >> }
steps:
- run:
name: Install dependencies - legacy mode
command: npm install
- when:
condition:
not:
matches: { pattern: "14.0", value: << parameters.version >> }
steps:
- run:
name: Install dependencies
command: npm ci
- run:
name: Install typescript
command: |
npm install --no-save typescript@4.7.4
- run:
name: Run tests
command: npm test