-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.yml
82 lines (74 loc) · 1.65 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
75
76
77
78
79
80
81
82
version: 2.1
orbs:
node: circleci/[email protected]
commands:
install-volta:
description: Install volta to manage Node/npm versions
steps:
- run:
name: Install volta
# Teach the volta installer to update Circle's special env
# file instead of the default.
command: |
curl https://get.volta.sh | PROFILE="$BASH_ENV" bash
setup-node:
parameters:
node-version:
type: string
default: ''
steps:
- install-volta
- checkout
- when:
condition: << parameters.node-version >>
steps:
- run: volta pin node@<< parameters.node-version >>
- run: node --version
- run: npm --version
- node/install-packages
jobs:
NodeJS:
parameters:
node-version:
type: string
docker:
- image: cimg/base:stable
steps:
- setup-node:
node-version: <<parameters.node-version>>
- run: npm run build
- run: npm run test:ci
- store_test_results:
path: junit.xml
Prettier:
docker:
- image: cimg/base:stable
steps:
- setup-node
- run: npm run prettier-check
Lint:
docker:
- image: cimg/base:stable
steps:
- setup-node
- run: npm run lint
Spell Check:
docker:
- image: cimg/base:stable
steps:
- setup-node
- run: npm run spell-check
workflows:
version: 2
Build:
jobs:
- NodeJS:
name: NodeJS << matrix.node-version >>
matrix:
parameters:
node-version:
- "18"
- "20"
- Prettier
- Lint
- Spell Check