From 556d0194a54a5cafebacf8c15531e55802b30198 Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Tue, 7 Nov 2023 16:03:40 +0100 Subject: [PATCH] ci: save test results in CircleCI --- .circleci/config.yml | 32 ++++++++++++++++++++ .gitignore | 3 +- packages/advanced-logic/jest.config.js | 15 +++++++++ packages/advanced-logic/package.json | 1 + packages/currency/jest.config.js | 15 +++++++++ packages/currency/package.json | 1 + packages/data-access/jest.config.js | 15 +++++++++ packages/data-access/package.json | 1 + packages/data-format/jest.config.js | 15 +++++++++ packages/data-format/package.json | 1 + packages/epk-decryption/jest.config.js | 15 +++++++++ packages/epk-decryption/package.json | 1 + packages/epk-signature/jest.config.js | 15 +++++++++ packages/epk-signature/package.json | 1 + packages/ethereum-storage/jest.config.js | 15 +++++++++ packages/ethereum-storage/package.json | 1 + packages/integration-test/jest.config.js | 15 +++++++++ packages/integration-test/package.json | 1 + packages/multi-format/jest.config.js | 15 +++++++++ packages/multi-format/package.json | 1 + packages/payment-detection/jest.config.js | 15 +++++++++ packages/payment-detection/package.json | 1 + packages/payment-processor/jest.config.js | 15 +++++++++ packages/payment-processor/package.json | 1 + packages/request-client.js/jest.config.js | 15 +++++++++ packages/request-client.js/package.json | 1 + packages/request-logic/jest.config.js | 15 +++++++++ packages/request-logic/package.json | 1 + packages/request-node/jest.config.js | 15 +++++++++ packages/request-node/package.json | 1 + packages/smart-contracts/jest.config.js | 15 +++++++++ packages/thegraph-data-access/jest.config.js | 15 +++++++++ packages/thegraph-data-access/package.json | 1 + packages/transaction-manager/jest.config.js | 15 +++++++++ packages/transaction-manager/package.json | 1 + packages/utils/jest.config.js | 15 +++++++++ packages/utils/package.json | 1 + packages/web3-signature/jest.config.js | 15 +++++++++ packages/web3-signature/package.json | 1 + yarn.lock | 15 +++++++++ 40 files changed, 352 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f99d3610c..37cfb573e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -130,6 +130,8 @@ jobs: - run: name: 'Test request-client.js' command: 'yarn workspace @requestnetwork/request-client.js run test --ci --maxWorkers=1' + - store_test_results: + path: packages/request-client.js/reports/ - persist_to_workspace: root: *working_directory paths: @@ -147,6 +149,8 @@ jobs: - run: name: 'Test data-access' command: 'yarn workspace @requestnetwork/data-access run test --ci --maxWorkers=1' + - store_test_results: + path: packages/data-access/reports/ - persist_to_workspace: root: *working_directory paths: @@ -164,6 +168,8 @@ jobs: - run: name: 'Test data-format' command: 'yarn workspace @requestnetwork/data-format run test --ci --maxWorkers=1' + - store_test_results: + path: packages/data-format/reports/ - persist_to_workspace: root: *working_directory paths: @@ -181,6 +187,8 @@ jobs: - run: name: 'Test transaction-manager' command: 'yarn workspace @requestnetwork/transaction-manager run test --ci --maxWorkers=1' + - store_test_results: + path: packages/transaction-manager/reports/ - persist_to_workspace: root: *working_directory paths: @@ -203,6 +211,8 @@ jobs: - run: name: 'Test ethereum-storage' command: 'yarn workspace @requestnetwork/ethereum-storage run test --ci --maxWorkers=1' + - store_test_results: + path: packages/ethereum-storage/reports/ - persist_to_workspace: root: *working_directory paths: @@ -240,6 +250,8 @@ jobs: - run: name: 'Test request-logic' command: 'yarn workspace @requestnetwork/request-logic run test --ci --maxWorkers=1' + - store_test_results: + path: packages/request-logic/reports/ - persist_to_workspace: root: *working_directory paths: @@ -257,6 +269,8 @@ jobs: - run: name: 'Test advanced-logic' command: 'yarn workspace @requestnetwork/advanced-logic run test --ci --maxWorkers=1' + - store_test_results: + path: packages/advanced-logic/reports/ - persist_to_workspace: root: *working_directory paths: @@ -282,6 +296,8 @@ jobs: - run: name: 'Test request-node' command: 'yarn workspace @requestnetwork/request-node run test --ci' + - store_test_results: + path: packages/request-node/reports/ - persist_to_workspace: root: *working_directory paths: @@ -297,6 +313,8 @@ jobs: - run: name: 'Test utils' command: 'yarn workspace @requestnetwork/utils run test --ci --maxWorkers=1' + - store_test_results: + path: packages/utils/reports/ - persist_to_workspace: root: *working_directory paths: @@ -311,6 +329,8 @@ jobs: - run: name: 'Test currency' command: 'yarn workspace @requestnetwork/currency run test --ci --maxWorkers=1' + - store_test_results: + path: packages/currency/reports/ - persist_to_workspace: root: *working_directory paths: @@ -328,6 +348,8 @@ jobs: - run: name: 'Test epk-signature' command: 'yarn workspace @requestnetwork/epk-signature run test --ci --maxWorkers=1' + - store_test_results: + path: packages/epk-signature/reports/ - persist_to_workspace: root: *working_directory paths: @@ -345,6 +367,8 @@ jobs: - run: name: 'Test epk-decryption' command: 'yarn workspace @requestnetwork/epk-decryption run test --ci --maxWorkers=1' + - store_test_results: + path: packages/epk-decryption/reports/ - persist_to_workspace: root: *working_directory paths: @@ -362,6 +386,8 @@ jobs: - run: name: 'Test web3-signature' command: 'yarn workspace @requestnetwork/web3-signature run test --ci --maxWorkers=1' + - store_test_results: + path: packages/web3-signature/reports/ - persist_to_workspace: root: *working_directory paths: @@ -431,6 +457,8 @@ jobs: - run: name: 'Test multi-format' command: 'yarn workspace @requestnetwork/multi-format run test --ci --maxWorkers=1' + - store_test_results: + path: packages/multi-format/reports/ - persist_to_workspace: root: *working_directory paths: @@ -452,6 +480,8 @@ jobs: - run: name: 'Test payment-detection' command: 'yarn workspace @requestnetwork/payment-detection run test --ci' + - store_test_results: + path: packages/payment-detection/reports/ - persist_to_workspace: root: *working_directory paths: @@ -473,6 +503,8 @@ jobs: - run: name: 'Test payment-processor' command: 'yarn workspace @requestnetwork/payment-processor run test --ci' + - store_test_results: + path: packages/payment-processor/reports/ - persist_to_workspace: root: *working_directory paths: diff --git a/.gitignore b/.gitignore index 690f7b74e7..42b1b92093 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,9 @@ yarn-error.log tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo -# coverage +# tests /packages/*/coverage/ +/packages/*/reports/ # payment-detection generated files /packages/payment-detection/src/thegraph/generated/ diff --git a/packages/advanced-logic/jest.config.js b/packages/advanced-logic/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/advanced-logic/jest.config.js +++ b/packages/advanced-logic/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/advanced-logic/package.json b/packages/advanced-logic/package.json index 039c6c9ace..fb9e0b973d 100644 --- a/packages/advanced-logic/package.json +++ b/packages/advanced-logic/package.json @@ -48,6 +48,7 @@ "@types/jest": "29.5.6", "@types/node": "16.11.7", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "ts-jest": "29.1.0", diff --git a/packages/currency/jest.config.js b/packages/currency/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/currency/jest.config.js +++ b/packages/currency/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/currency/package.json b/packages/currency/package.json index 3edd52f598..003f7eaa58 100644 --- a/packages/currency/package.json +++ b/packages/currency/package.json @@ -55,6 +55,7 @@ "@types/node-dijkstra": "2.5.2", "ethers": "5.5.1", "jest": "29.5.0", + "jest-junit": "16.0.0", "prettier": "2.1.1", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/data-access/jest.config.js b/packages/data-access/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/data-access/jest.config.js +++ b/packages/data-access/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/data-access/package.json b/packages/data-access/package.json index 1524d0521f..8323d620a3 100644 --- a/packages/data-access/package.json +++ b/packages/data-access/package.json @@ -48,6 +48,7 @@ "@types/jest": "29.5.6", "@types/node": "16.11.7", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/data-format/jest.config.js b/packages/data-format/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/data-format/jest.config.js +++ b/packages/data-format/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/data-format/package.json b/packages/data-format/package.json index a06b86ad10..e57ea7aa09 100644 --- a/packages/data-format/package.json +++ b/packages/data-format/package.json @@ -46,6 +46,7 @@ }, "devDependencies": { "@types/node": "16.11.7", + "jest-junit": "16.0.0", "nyc": "15.1.0", "rimraf": "3.0.2", "shx": "0.3.2", diff --git a/packages/epk-decryption/jest.config.js b/packages/epk-decryption/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/epk-decryption/jest.config.js +++ b/packages/epk-decryption/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/epk-decryption/package.json b/packages/epk-decryption/package.json index 3cd4e6e6c3..d2397a4779 100644 --- a/packages/epk-decryption/package.json +++ b/packages/epk-decryption/package.json @@ -52,6 +52,7 @@ "crypto-browserify": "3.12.0", "duplicate-package-checker-webpack-plugin": "3.0.0", "jest": "29.5.0", + "jest-junit": "16.0.0", "npm-run-all": "4.1.5", "nyc": "15.1.0", "shx": "0.3.2", diff --git a/packages/epk-signature/jest.config.js b/packages/epk-signature/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/epk-signature/jest.config.js +++ b/packages/epk-signature/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/epk-signature/package.json b/packages/epk-signature/package.json index 3b47335738..535349aa69 100644 --- a/packages/epk-signature/package.json +++ b/packages/epk-signature/package.json @@ -51,6 +51,7 @@ "crypto-browserify": "3.12.0", "duplicate-package-checker-webpack-plugin": "3.0.0", "jest": "29.5.0", + "jest-junit": "16.0.0", "npm-run-all": "4.1.5", "nyc": "15.1.0", "shx": "0.3.2", diff --git a/packages/ethereum-storage/jest.config.js b/packages/ethereum-storage/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/ethereum-storage/jest.config.js +++ b/packages/ethereum-storage/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/ethereum-storage/package.json b/packages/ethereum-storage/package.json index 5c0d1169ee..f5177e2399 100644 --- a/packages/ethereum-storage/package.json +++ b/packages/ethereum-storage/package.json @@ -58,6 +58,7 @@ "@types/node": "16.11.7", "axios-mock-adapter": "1.19.0", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "solium": "1.2.5", diff --git a/packages/integration-test/jest.config.js b/packages/integration-test/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/integration-test/jest.config.js +++ b/packages/integration-test/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/integration-test/package.json b/packages/integration-test/package.json index 510debb5d0..ebfd0f4043 100644 --- a/packages/integration-test/package.json +++ b/packages/integration-test/package.json @@ -59,6 +59,7 @@ "@types/node": "16.11.7", "ethers": "5.5.1", "jest": "29.5.0", + "jest-junit": "16.0.0", "npm-run-all": "4.1.5", "ts-jest": "29.1.0", "ts-node": "10.9.1", diff --git a/packages/multi-format/jest.config.js b/packages/multi-format/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/multi-format/jest.config.js +++ b/packages/multi-format/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/multi-format/package.json b/packages/multi-format/package.json index 733d5075f5..67d3ccc5e1 100644 --- a/packages/multi-format/package.json +++ b/packages/multi-format/package.json @@ -46,6 +46,7 @@ "devDependencies": { "@types/jest": "29.5.6", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/payment-detection/jest.config.js b/packages/payment-detection/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/payment-detection/jest.config.js +++ b/packages/payment-detection/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/payment-detection/package.json b/packages/payment-detection/package.json index 3a1214373f..366d20d6eb 100644 --- a/packages/payment-detection/package.json +++ b/packages/payment-detection/package.json @@ -66,6 +66,7 @@ "@types/jest": "29.5.6", "@types/lodash": "4.14.161", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/payment-processor/jest.config.js b/packages/payment-processor/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/payment-processor/jest.config.js +++ b/packages/payment-processor/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/payment-processor/package.json b/packages/payment-processor/package.json index e3c7f45959..3f7914d769 100644 --- a/packages/payment-processor/package.json +++ b/packages/payment-processor/package.json @@ -53,6 +53,7 @@ "devDependencies": { "@types/jest": "29.5.6", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/request-client.js/jest.config.js b/packages/request-client.js/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/request-client.js/jest.config.js +++ b/packages/request-client.js/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/request-client.js/package.json b/packages/request-client.js/package.json index cc4f017b4e..eeade6ff6c 100644 --- a/packages/request-client.js/package.json +++ b/packages/request-client.js/package.json @@ -67,6 +67,7 @@ "crypto-browserify": "3.12.0", "duplicate-package-checker-webpack-plugin": "3.0.0", "jest": "29.5.0", + "jest-junit": "16.0.0", "npm-run-all": "4.1.5", "nyc": "15.1.0", "shx": "0.3.2", diff --git a/packages/request-logic/jest.config.js b/packages/request-logic/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/request-logic/jest.config.js +++ b/packages/request-logic/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/request-logic/package.json b/packages/request-logic/package.json index 0dc50f1602..284578ee3b 100644 --- a/packages/request-logic/package.json +++ b/packages/request-logic/package.json @@ -51,6 +51,7 @@ "@types/jest": "29.5.6", "@types/semver": "7.3.4", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/request-node/jest.config.js b/packages/request-node/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/request-node/jest.config.js +++ b/packages/request-node/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/request-node/package.json b/packages/request-node/package.json index 8e0ff1f60b..2100fcd053 100644 --- a/packages/request-node/package.json +++ b/packages/request-node/package.json @@ -73,6 +73,7 @@ "@types/supertest": "2.0.10", "@types/yargs": "17.0.14", "jest": "29.5.0", + "jest-junit": "16.0.0", "shx": "0.3.2", "source-map-support": "0.5.19", "supertest": "5.0.0", diff --git a/packages/smart-contracts/jest.config.js b/packages/smart-contracts/jest.config.js index 688f01714e..b8b70a0344 100644 --- a/packages/smart-contracts/jest.config.js +++ b/packages/smart-contracts/jest.config.js @@ -2,5 +2,20 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'd.ts'], }; diff --git a/packages/thegraph-data-access/jest.config.js b/packages/thegraph-data-access/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/thegraph-data-access/jest.config.js +++ b/packages/thegraph-data-access/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/thegraph-data-access/package.json b/packages/thegraph-data-access/package.json index 1ed102b045..a719a7f01f 100644 --- a/packages/thegraph-data-access/package.json +++ b/packages/thegraph-data-access/package.json @@ -51,6 +51,7 @@ "devDependencies": { "@types/jest": "29.5.6", "jest": "29.5.0", + "jest-junit": "16.0.0", "shx": "0.3.2", "source-map-support": "0.5.19", "ts-jest": "29.1.0", diff --git a/packages/transaction-manager/jest.config.js b/packages/transaction-manager/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/transaction-manager/jest.config.js +++ b/packages/transaction-manager/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/transaction-manager/package.json b/packages/transaction-manager/package.json index 351de512f7..c117f958af 100644 --- a/packages/transaction-manager/package.json +++ b/packages/transaction-manager/package.json @@ -47,6 +47,7 @@ "devDependencies": { "@types/jest": "29.5.6", "jest": "29.5.0", + "jest-junit": "16.0.0", "nyc": "15.1.0", "shx": "0.3.2", "source-map-support": "0.5.19", diff --git a/packages/utils/jest.config.js b/packages/utils/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/utils/jest.config.js +++ b/packages/utils/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/utils/package.json b/packages/utils/package.json index 64b1c34629..f08b2a03dd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -49,6 +49,7 @@ "devDependencies": { "@types/jest": "29.5.6", "jest": "29.5.0", + "jest-junit": "16.0.0", "shx": "0.3.2", "source-map-support": "0.5.19", "ts-jest": "29.1.0", diff --git a/packages/web3-signature/jest.config.js b/packages/web3-signature/jest.config.js index aa4a4384f8..0a7263097b 100644 --- a/packages/web3-signature/jest.config.js +++ b/packages/web3-signature/jest.config.js @@ -2,4 +2,19 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, + reporters: [ + 'default', + [ + 'jest-junit', + { + addFileAttribute: 'true', + ancestorSeparator: ' > ', + suiteNameTemplate: '{filename}', + classNameTemplate: '{classname}', + titleTemplate: '{title}', + outputDirectory: 'reports', + outputName: 'jest-results.xml', + }, + ], + ], }; diff --git a/packages/web3-signature/package.json b/packages/web3-signature/package.json index 3439ab0931..40e6145d2e 100644 --- a/packages/web3-signature/package.json +++ b/packages/web3-signature/package.json @@ -52,6 +52,7 @@ "crypto-browserify": "3.12.0", "duplicate-package-checker-webpack-plugin": "3.0.0", "jest": "29.5.0", + "jest-junit": "16.0.0", "npm-run-all": "4.1.5", "nyc": "15.1.0", "shx": "0.3.2", diff --git a/yarn.lock b/yarn.lock index fce3050608..dd257b47bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13874,6 +13874,16 @@ jest-haste-map@^29.7.0: optionalDependencies: fsevents "^2.3.2" +jest-junit@16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" + integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== + dependencies: + mkdirp "^1.0.4" + strip-ansi "^6.0.1" + uuid "^8.3.2" + xml "^1.0.1" + jest-leak-detector@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" @@ -22510,6 +22520,11 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== + xmldoc@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.2.tgz"