From 430cecbde912cdc7bdba815b244a6e3eb7abcb3b Mon Sep 17 00:00:00 2001 From: Vishvamsinh Vaghela Date: Sat, 31 Aug 2024 19:39:39 +0530 Subject: [PATCH] ffef --- .github/workflows/if-nodejs-pr-testing.yml | 11 +++++++++++ jest.config.js | 10 ++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 2154143339cc..9e9e2d6d7188 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -72,3 +72,14 @@ jobs: name: Run release assets generation to make sure PR does not break it shell: bash run: npm run generate:assets --if-present + + - if: steps.packagejson.outputs.exists == 'true' + name: Upload coverage to Codecov + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 + with: + fail_ci_if_error: true + files: ./coverage/lcov.info + flags: unittests + name: codecov-umbrella + token: 25358ea8-8f8c-4ee1-aff3-282914082378 + verbose: true \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 496a9fddf929..6c78ac0099e8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,7 @@ module.exports = { - verbose: true, // display individual test results with the test suite hierarchy - collectCoverage: true, // collect test coverage information\ - collectCoverageFrom: ['scripts/**/*.js'] -}; + verbose: true, + collectCoverage: true, + collectCoverageFrom: ['scripts/**/*.js'], + coverageReporters: ['text', 'lcov', 'json-summary'], + coverageDirectory: 'coverage' +}; \ No newline at end of file