Skip to content

Commit aed48f9

Browse files
ci: save test results in CircleCI (#1231)
1 parent 835d564 commit aed48f9

File tree

41 files changed

+164
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+164
-58
lines changed

.circleci/config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ jobs:
130130
- run:
131131
name: 'Test request-client.js'
132132
command: 'yarn workspace @requestnetwork/request-client.js run test --ci --maxWorkers=1'
133+
- store_test_results:
134+
path: packages/request-client.js/reports/
133135
- persist_to_workspace:
134136
root: *working_directory
135137
paths:
@@ -147,6 +149,8 @@ jobs:
147149
- run:
148150
name: 'Test data-access'
149151
command: 'yarn workspace @requestnetwork/data-access run test --ci --maxWorkers=1'
152+
- store_test_results:
153+
path: packages/data-access/reports/
150154
- persist_to_workspace:
151155
root: *working_directory
152156
paths:
@@ -164,6 +168,8 @@ jobs:
164168
- run:
165169
name: 'Test data-format'
166170
command: 'yarn workspace @requestnetwork/data-format run test --ci --maxWorkers=1'
171+
- store_test_results:
172+
path: packages/data-format/reports/
167173
- persist_to_workspace:
168174
root: *working_directory
169175
paths:
@@ -181,6 +187,8 @@ jobs:
181187
- run:
182188
name: 'Test transaction-manager'
183189
command: 'yarn workspace @requestnetwork/transaction-manager run test --ci --maxWorkers=1'
190+
- store_test_results:
191+
path: packages/transaction-manager/reports/
184192
- persist_to_workspace:
185193
root: *working_directory
186194
paths:
@@ -203,6 +211,8 @@ jobs:
203211
- run:
204212
name: 'Test ethereum-storage'
205213
command: 'yarn workspace @requestnetwork/ethereum-storage run test --ci --maxWorkers=1'
214+
- store_test_results:
215+
path: packages/ethereum-storage/reports/
206216
- persist_to_workspace:
207217
root: *working_directory
208218
paths:
@@ -240,6 +250,8 @@ jobs:
240250
- run:
241251
name: 'Test request-logic'
242252
command: 'yarn workspace @requestnetwork/request-logic run test --ci --maxWorkers=1'
253+
- store_test_results:
254+
path: packages/request-logic/reports/
243255
- persist_to_workspace:
244256
root: *working_directory
245257
paths:
@@ -257,6 +269,8 @@ jobs:
257269
- run:
258270
name: 'Test advanced-logic'
259271
command: 'yarn workspace @requestnetwork/advanced-logic run test --ci --maxWorkers=1'
272+
- store_test_results:
273+
path: packages/advanced-logic/reports/
260274
- persist_to_workspace:
261275
root: *working_directory
262276
paths:
@@ -282,6 +296,8 @@ jobs:
282296
- run:
283297
name: 'Test request-node'
284298
command: 'yarn workspace @requestnetwork/request-node run test --ci'
299+
- store_test_results:
300+
path: packages/request-node/reports/
285301
- persist_to_workspace:
286302
root: *working_directory
287303
paths:
@@ -297,6 +313,8 @@ jobs:
297313
- run:
298314
name: 'Test utils'
299315
command: 'yarn workspace @requestnetwork/utils run test --ci --maxWorkers=1'
316+
- store_test_results:
317+
path: packages/utils/reports/
300318
- persist_to_workspace:
301319
root: *working_directory
302320
paths:
@@ -311,6 +329,8 @@ jobs:
311329
- run:
312330
name: 'Test currency'
313331
command: 'yarn workspace @requestnetwork/currency run test --ci --maxWorkers=1'
332+
- store_test_results:
333+
path: packages/currency/reports/
314334
- persist_to_workspace:
315335
root: *working_directory
316336
paths:
@@ -328,6 +348,8 @@ jobs:
328348
- run:
329349
name: 'Test epk-signature'
330350
command: 'yarn workspace @requestnetwork/epk-signature run test --ci --maxWorkers=1'
351+
- store_test_results:
352+
path: packages/epk-signature/reports/
331353
- persist_to_workspace:
332354
root: *working_directory
333355
paths:
@@ -345,6 +367,8 @@ jobs:
345367
- run:
346368
name: 'Test epk-decryption'
347369
command: 'yarn workspace @requestnetwork/epk-decryption run test --ci --maxWorkers=1'
370+
- store_test_results:
371+
path: packages/epk-decryption/reports/
348372
- persist_to_workspace:
349373
root: *working_directory
350374
paths:
@@ -362,6 +386,8 @@ jobs:
362386
- run:
363387
name: 'Test web3-signature'
364388
command: 'yarn workspace @requestnetwork/web3-signature run test --ci --maxWorkers=1'
389+
- store_test_results:
390+
path: packages/web3-signature/reports/
365391
- persist_to_workspace:
366392
root: *working_directory
367393
paths:
@@ -431,6 +457,8 @@ jobs:
431457
- run:
432458
name: 'Test multi-format'
433459
command: 'yarn workspace @requestnetwork/multi-format run test --ci --maxWorkers=1'
460+
- store_test_results:
461+
path: packages/multi-format/reports/
434462
- persist_to_workspace:
435463
root: *working_directory
436464
paths:
@@ -452,6 +480,8 @@ jobs:
452480
- run:
453481
name: 'Test payment-detection'
454482
command: 'yarn workspace @requestnetwork/payment-detection run test --ci'
483+
- store_test_results:
484+
path: packages/payment-detection/reports/
455485
- persist_to_workspace:
456486
root: *working_directory
457487
paths:
@@ -473,6 +503,8 @@ jobs:
473503
- run:
474504
name: 'Test payment-processor'
475505
command: 'yarn workspace @requestnetwork/payment-processor run test --ci'
506+
- store_test_results:
507+
path: packages/payment-processor/reports/
476508
- persist_to_workspace:
477509
root: *working_directory
478510
paths:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ yarn-error.log
2525
tsconfig.tsbuildinfo
2626
tsconfig.build.tsbuildinfo
2727

28-
# coverage
28+
# tests
2929
/packages/*/coverage/
30+
/packages/*/reports/
3031

3132
# payment-detection generated files
3233
/packages/payment-detection/src/thegraph/generated/

jest.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/** @type {import('jest').Config} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
collectCoverage: true,
6+
reporters: [
7+
'default',
8+
[
9+
'jest-junit',
10+
{
11+
addFileAttribute: 'true',
12+
ancestorSeparator: ' > ',
13+
suiteNameTemplate: '{filename}',
14+
classNameTemplate: '{classname}',
15+
titleTemplate: '{title}',
16+
outputDirectory: 'reports',
17+
outputName: 'jest-results.xml',
18+
},
19+
],
20+
],
21+
};
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const jestCommonConfig = require('../../jest.config');
2+
3+
/** @type {import('jest').Config} */
14
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
collectCoverage: true,
5+
...jestCommonConfig,
56
};

packages/advanced-logic/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@types/jest": "29.5.6",
4949
"@types/node": "16.11.7",
5050
"jest": "29.5.0",
51+
"jest-junit": "16.0.0",
5152
"nyc": "15.1.0",
5253
"shx": "0.3.2",
5354
"ts-jest": "29.1.0",

packages/currency/jest.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const jestCommonConfig = require('../../jest.config');
2+
3+
/** @type {import('jest').Config} */
14
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
collectCoverage: true,
5+
...jestCommonConfig,
56
};

packages/currency/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"@types/node-dijkstra": "2.5.2",
5656
"ethers": "5.5.1",
5757
"jest": "29.5.0",
58+
"jest-junit": "16.0.0",
5859
"prettier": "2.1.1",
5960
"shx": "0.3.2",
6061
"source-map-support": "0.5.19",

packages/data-access/jest.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const jestCommonConfig = require('../../jest.config');
2+
3+
/** @type {import('jest').Config} */
14
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
collectCoverage: true,
5+
...jestCommonConfig,
56
};

packages/data-access/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@types/jest": "29.5.6",
4949
"@types/node": "16.11.7",
5050
"jest": "29.5.0",
51+
"jest-junit": "16.0.0",
5152
"nyc": "15.1.0",
5253
"shx": "0.3.2",
5354
"source-map-support": "0.5.19",

packages/data-format/jest.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const jestCommonConfig = require('../../jest.config');
2+
3+
/** @type {import('jest').Config} */
14
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
collectCoverage: true,
5+
...jestCommonConfig,
56
};

0 commit comments

Comments
 (0)