@mojaloop/ml-testing-toolkit-shared-lib 12.0.2 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,301 +0,0 @@
1
- # CircleCI v2 Config
2
- version: 2
3
-
4
- defaults_working_directory: &defaults_working_directory
5
- working_directory: /home/circleci/project
6
-
7
- defaults_docker_node: &defaults_docker_node
8
- docker:
9
- - image: mhart/alpine-node:12.16.0
10
-
11
- defaults_Dependencies: &defaults_Dependencies |
12
- apk --no-cache add git
13
- apk --no-cache add ca-certificates
14
- apk --no-cache add curl
15
- apk --no-cache add openssh-client
16
- apk --no-cache add bash
17
- apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake
18
- npm config set unsafe-perm true
19
- npm install -g node-gyp
20
-
21
- defaults_awsCliDependencies: &defaults_awsCliDependencies |
22
- apk --no-cache add \
23
- python \
24
- py-pip \
25
- groff \
26
- less \
27
- mailcap
28
- pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic
29
- apk -v --purge del py-pip
30
-
31
- defaults_license_scanner: &defaults_license_scanner
32
- name: Install and set up license-scanner
33
- command: |
34
- git clone https://github.com/mojaloop/license-scanner /tmp/license-scanner
35
- cd /tmp/license-scanner && make build default-files set-up
36
-
37
- defaults_npm_auth: &defaults_npm_auth
38
- name: Update NPM registry auth token
39
- command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
40
-
41
- defaults_npm_publish_version: &defaults_npm_publish
42
- name: Update version to prerelease
43
- command: |
44
- source $BASH_ENV
45
- echo "Publishing tag $CIRCLE_TAG"
46
- npm publish --tag $CIRCLE_TAG --access public
47
-
48
- defaults_npm_publish_release: &defaults_npm_publish_release
49
- name: Publish NPM $RELEASE_TAG artifact
50
- command: |
51
- source $BASH_ENV
52
- echo "Publishing tag $RELEASE_TAG"
53
- npm publish --tag $RELEASE_TAG --access public
54
-
55
- defaults_slack_announcement: &defaults_slack_announcement
56
- name: Slack announcement for tag releases
57
- command: |
58
- curl -X POST \
59
- $SLACK_WEBHOOK_ANNOUNCEMENT \
60
- -H 'Content-type: application/json' \
61
- -H 'cache-control: no-cache' \
62
- -d "{
63
- \"text\": \"*${CIRCLE_PROJECT_REPONAME}* - Release \`${CIRCLE_TAG}\`: https://github.com/mojaloop/${CIRCLE_PROJECT_REPONAME}/releases/tag/${CIRCLE_TAG}\"
64
- }"
65
-
66
- jobs:
67
- setup:
68
- <<: *defaults_working_directory
69
- <<: *defaults_docker_node
70
- steps:
71
- - run:
72
- name: Install general dependencies
73
- command: *defaults_Dependencies
74
- - checkout
75
- - run:
76
- name: Update NPM install
77
- command: npm install
78
- - save_cache:
79
- key: dependency-cache-{{ checksum "package.json" }}
80
- paths:
81
- - node_modules
82
-
83
- test-unit:
84
- <<: *defaults_working_directory
85
- <<: *defaults_docker_node
86
- steps:
87
- - run:
88
- name: Install general dependencies
89
- command: *defaults_Dependencies
90
- - checkout
91
- - restore_cache:
92
- key: dependency-cache-{{ checksum "package.json" }}
93
- - run:
94
- name: Create dir for test results
95
- command: mkdir -p ./test/results
96
- - run:
97
- name: Execute unit tests
98
- command: npm -s run test:junit
99
- - store_artifacts:
100
- path: ./test/results
101
- prefix: test
102
- - store_test_results:
103
- path: ./test/results
104
-
105
- test-coverage:
106
- <<: *defaults_working_directory
107
- <<: *defaults_docker_node
108
- steps:
109
- - run:
110
- name: Install general dependencies
111
- command: *defaults_Dependencies
112
- - run:
113
- name: Install AWS CLI dependencies
114
- command: *defaults_awsCliDependencies
115
- - checkout
116
- - restore_cache:
117
- key: dependency-cache-{{ checksum "package.json" }}
118
- - run:
119
- name: Execute code coverage check
120
- command: npm -s run test:coverage-check
121
- - store_artifacts:
122
- path: coverage
123
- prefix: test
124
- - store_test_results:
125
- path: coverage
126
- - run:
127
- name: Copy code coverage to SonarQube
128
- command: |
129
- if [ "${CIRCLE_BRANCH}" == "master" ];
130
- then
131
- echo "Sending lcov.info to SonarQube..."
132
- aws s3 cp coverage/lcov.info $AWS_S3_DIR_SONARQUBE/ml-testing-toolkit-shared-lib/lcov.info
133
- else
134
- echo "Not a release (env CIRCLE_BRANCH != 'master'), skipping sending lcov.info to SonarQube."
135
- fi
136
-
137
- vulnerability-check:
138
- <<: *defaults_working_directory
139
- <<: *defaults_docker_node
140
- steps:
141
- - run:
142
- name: Install general dependencies
143
- command: *defaults_Dependencies
144
- - checkout
145
- - restore_cache:
146
- key: dependency-cache-{{ checksum "package.json" }}
147
- - run:
148
- name: Create dir for test results
149
- command: mkdir -p ./audit/results
150
- - run:
151
- name: Check for new npm vulnerabilities
152
- command: npm run audit:check --silent -- --json > ./audit/results/auditResults.json
153
- - store_artifacts:
154
- path: ./audit/results
155
- prefix: audit
156
-
157
- audit-licenses:
158
- <<: *defaults_working_directory
159
- <<: *defaults_docker_node
160
- steps:
161
- - run:
162
- name: Install general dependencies
163
- command: *defaults_Dependencies
164
- - run:
165
- <<: *defaults_license_scanner
166
- - checkout
167
- - restore_cache:
168
- key: dependency-cache-{{ checksum "package.json" }}
169
- - run:
170
- name: Prune non-production packages before running license-scanner
171
- command: npm prune --production
172
- - run:
173
- name: Run the license-scanner
174
- command: cd /tmp/license-scanner && pathToRepo=$CIRCLE_WORKING_DIRECTORY make run
175
- - store_artifacts:
176
- path: /tmp/license-scanner/results
177
- prefix: licenses
178
-
179
- build-snapshot:
180
- <<: *defaults_working_directory
181
- <<: *defaults_docker_node
182
- steps:
183
- - run:
184
- name: Install general dependencies
185
- command: *defaults_Dependencies
186
- - checkout
187
- - run:
188
- name: setup environment vars for SNAPSHOT release
189
- command: |
190
- echo 'export RELEASE_TAG=$RELEASE_TAG_SNAPSHOT' >> $BASH_ENV
191
- - run:
192
- <<: *defaults_npm_auth
193
- - run:
194
- <<: *defaults_npm_publish_release
195
- - run:
196
- <<: *defaults_slack_announcement
197
-
198
- build:
199
- <<: *defaults_working_directory
200
- <<: *defaults_docker_node
201
- steps:
202
- - run:
203
- name: Install general dependencies
204
- command: *defaults_Dependencies
205
- - checkout
206
- - run:
207
- name: setup environment vars for LATEST release
208
- command: |
209
- echo 'export RELEASE_TAG=$RELEASE_TAG_PROD' >> $BASH_ENV
210
- - run:
211
- <<: *defaults_npm_auth
212
- - run:
213
- <<: *defaults_npm_publish_release
214
- - run:
215
- <<: *defaults_slack_announcement
216
-
217
- workflows:
218
- version: 2
219
- build_and_test:
220
- jobs:
221
- - setup:
222
- context: org-global
223
- filters:
224
- tags:
225
- only: /.*/
226
- branches:
227
- ignore:
228
- - /feature*/
229
- - /bugfix*/
230
- - test-unit:
231
- context: org-global
232
- requires:
233
- - setup
234
- filters:
235
- tags:
236
- only: /.*/
237
- branches:
238
- ignore:
239
- - /feature*/
240
- - /bugfix*/
241
- - test-coverage:
242
- context: org-global
243
- requires:
244
- - setup
245
- filters:
246
- tags:
247
- only: /.*/
248
- branches:
249
- ignore:
250
- - /feature*/
251
- - /bugfix*/
252
- - vulnerability-check:
253
- context: org-global
254
- requires:
255
- - setup
256
- filters:
257
- tags:
258
- only: /.*/
259
- branches:
260
- ignore:
261
- - /feature*/
262
- - /bugfix*/
263
- - audit-licenses:
264
- context: org-global
265
- requires:
266
- - setup
267
- filters:
268
- tags:
269
- only: /.*/
270
- branches:
271
- ignore:
272
- - /feature*/
273
- - /bugfix*/
274
- - build-snapshot:
275
- context: org-global
276
- requires:
277
- - setup
278
- - test-unit
279
- - test-coverage
280
- - vulnerability-check
281
- - audit-licenses
282
- filters:
283
- tags:
284
- only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
285
- branches:
286
- ignore:
287
- - /.*/
288
- - build:
289
- context: org-global
290
- requires:
291
- - setup
292
- - test-unit
293
- - test-coverage
294
- - vulnerability-check
295
- - audit-licenses
296
- filters:
297
- tags:
298
- only: /v[0-9]+(\.[0-9]+)*/
299
- branches:
300
- ignore:
301
- - /.*/
@@ -1,22 +0,0 @@
1
- {
2
- "decisions": {
3
- "1589|npm-check-updates>libnpmconfig>ini": {
4
- "decision": "postpone",
5
- "madeAt": 1608030468877
6
- },
7
- "1589|npm-check-updates>update-notifier>is-installed-globally>global-dirs>ini": {
8
- "decision": "postpone",
9
- "madeAt": 1608030468877
10
- },
11
- "1589|npm-check-updates>update-notifier>latest-version>package-json>registry-auth-token>rc>ini": {
12
- "decision": "postpone",
13
- "madeAt": 1608030468877
14
- },
15
- "1589|npm-check-updates>update-notifier>latest-version>package-json>registry-url>rc>ini": {
16
- "decision": "postpone",
17
- "madeAt": 1608030468877
18
- }
19
- },
20
- "rules": {},
21
- "version": 1
22
- }