File tree Expand file tree Collapse file tree 1 file changed +80
-0
lines changed
Expand file tree Collapse file tree 1 file changed +80
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2.1
2+
3+ executors :
4+ node :
5+ parameters :
6+ tag :
7+ type : string
8+ docker :
9+ - image : cimg/node:<< parameters.tag >>
10+
11+ commands :
12+ install-dependencies :
13+ steps :
14+ - run :
15+ name : " Install project dependencies"
16+ command : npm i
17+ apt-update :
18+ steps :
19+ - run :
20+ name : " APT update"
21+ command : sudo apt-get update
22+ install-prerequisites :
23+ steps :
24+ - run :
25+ name : " Fetch and install libsecret"
26+ command : sudo apt-get install -y libsecret-1-dev
27+ run-unit-tests :
28+ steps :
29+ - run :
30+ name : " Run unit tests"
31+ command : npm run test:ci
32+ run-linter :
33+ steps :
34+ - run :
35+ name : " Run linter"
36+ command : npm run lint
37+
38+ jobs :
39+ pr-validator :
40+ resource_class : xlarge
41+ environment :
42+ NODE_OPTIONS : --max-old-space-size=14336
43+ CI : " "
44+ parameters :
45+ node-version :
46+ type : string
47+ executor :
48+ name : node
49+ tag : << parameters.node-version >>
50+ steps :
51+ - checkout
52+ - apt-update
53+ - install-prerequisites
54+ - install-dependencies
55+ - run-linter
56+ - run-unit-tests
57+ - when :
58+ condition :
59+ equal : [<< parameters.node-version >>, lts]
60+ steps :
61+ - run :
62+ name : " CODECOV"
63+ command : npm run coverage -- --token=$CODECOV_TOKEN
64+
65+ workflows :
66+ validate :
67+ jobs :
68+ - pr-validator :
69+ matrix :
70+ parameters :
71+ node-version : ["10.24", "12.21", "14.16", lts]
72+ filters :
73+ branches :
74+ only : /^(main|v[1-9]?[0-9]-beta)$/
75+ post-steps :
76+ - run :
77+ name : Send Slack notification
78+ command : |
79+ curl -X POST -H "Content-type:application/json" --data "{'text':':error: $CIRCLE_PROJECT_REPONAME/$CIRCLE_BRANCH - $CIRCLE_PULL_REQUEST validation failed on *Node:${CIRCLE_JOB/pr-validator-/''}*. View <$CIRCLE_BUILD_URL|build>. cc: <@$CIRCLE_USERNAME>', 'mrkdwn':true}" $SLACK_WEBHOOK
80+ when : on_fail
You can’t perform that action at this time.
0 commit comments