File tree Expand file tree Collapse file tree 5 files changed +119
-67
lines changed Expand file tree Collapse file tree 5 files changed +119
-67
lines changed Original file line number Diff line number Diff line change
1
+ version : 2.1
2
+
3
+ defaults : &defaults
4
+ parameters :
5
+ node_version :
6
+ type : string
7
+ default : " "
8
+
9
+ commands :
10
+ npmrc :
11
+ steps :
12
+ - run :
13
+ name : Create .npmrc
14
+ command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
15
+
16
+ setup_git :
17
+ steps :
18
+ - run :
19
+ name : " Setup git environment"
20
+ command : git config --global core.autocrlf false
21
+
22
+ install_node_npm :
23
+ << : *defaults
24
+ description : Install specific version of Node
25
+ steps :
26
+ - run :
27
+ name : Installing node version << parameters.node_version >>
28
+ command : nvm install << parameters.node_version >>
29
+ - run :
30
+ name : Using node version << parameters.node_version >>
31
+ command : nvm use << parameters.node_version >>
32
+
33
+ show_node_npm_version :
34
+ description : Log Node and npm version
35
+ steps :
36
+ - run :
37
+ name : Node version
38
+ command : node --version
39
+ - run :
40
+ name : NPM version
41
+ command : npm --version
42
+
43
+ install_deps :
44
+ description : Install dependencies
45
+ steps :
46
+ - run :
47
+ name : Install npm dependencies
48
+ command : npm install
49
+ jobs :
50
+ lint :
51
+ << : *defaults
52
+ docker :
53
+ - image : circleci/node:<< parameters.node_version >>
54
+ steps :
55
+ - checkout
56
+ - show_node_npm_version
57
+ - install_deps
58
+ - run :
59
+ name : Run lint
60
+ command : npm run lint
61
+
62
+ test-unix :
63
+ << : *defaults
64
+ docker :
65
+ - image : circleci/node:<< parameters.node_version >>
66
+ steps :
67
+ - checkout
68
+ - show_node_npm_version
69
+ - install_deps
70
+ - run :
71
+ name : Run tests
72
+ command : npm run test:unit
73
+
74
+ release :
75
+ << : *defaults
76
+ docker :
77
+ - image : circleci/node:<< parameters.node_version >>
78
+ resource_class : small
79
+ steps :
80
+ - checkout
81
+ - install_deps
82
+ - run :
83
+ name : Release
84
+ command : npx semantic-release
85
+
86
+ workflows :
87
+ version : 2
88
+ test_and_release :
89
+ jobs :
90
+ - lint :
91
+ name : lint
92
+ context : nodejs-install
93
+ node_version : " 12"
94
+
95
+ # UNIX tests
96
+ - test-unix :
97
+ name : Unix Tests for Node << matrix.node_version >>
98
+ context : nodejs-install
99
+ requires :
100
+ - lint
101
+ matrix :
102
+ parameters :
103
+ node_version : ["16.13.1", "14.18.2", "12.22.7"]
104
+
105
+ - release :
106
+ name : Release
107
+ context : nodejs-lib-release
108
+ node_version : " lts"
109
+ requires :
110
+ - lint
111
+ - test-unix
112
+ filters :
113
+ branches :
114
+ only :
115
+ - master
Original file line number Diff line number Diff line change 1
- * @ snyk/loki
1
+ * @ snyk/poke
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ yarn.lock
10
10
.eslintcache
11
11
coverage /
12
12
# Diagnostic reports (https://nodejs.org/api/report.html)
13
- report. [0-9 ]* . [0-9 ]* . [0-9 ]* . [0-9 ]* .json
13
+ report. [0-9 ]* . [0-9 ]* . [0-9 ]* . [0-9 ]* .json
14
+ # IDEs
15
+ .idea
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments