From f3f182a8348f47e93b72773a91e18143aa675b2c Mon Sep 17 00:00:00 2001 From: Prakash Date: Fri, 24 Feb 2023 06:00:46 +0530 Subject: [PATCH 01/22] summary report --- .gitignore | 1 + jest.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 436b302..da7239e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules /.cache /build /public/build +/coverage .env package-lock.json diff --git a/jest.config.js b/jest.config.js index 1928e8d..c862435 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,6 +6,7 @@ module.exports = { '^.+\\.(t|j)sx?$': 'ts-jest', }, setupFilesAfterEnv: ['./jest.setup.js'], + reporters: [['github-actions', { silent: false }], 'summary'], coverageThreshold: { global: { branches: 100, From 94b286603fe9713957ff2ee79169020803a6f799 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:14:15 +0530 Subject: [PATCH 02/22] add jest-coverage-report covert --- .github/workflows/tests-coverage.yml | 42 ++++++++++------------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 460539c..e5d26d0 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,30 +1,16 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Tests CI - +name: Coverage report on: - pull_request: - branches: ['main', 'develop'] - + pull_request: + branches: + - develop + - main jobs: - build: - name: Run Coverage Tests - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - - steps: - - name: Checkout Branch To Runner - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - name: Install Yarn - run: yarn install --prefer-offline --immutable - - name: Run Coverage Tests - run: yarn run test:ci + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: artiomtr/jest-coverage-report-action@v1.3 + with: + threshold: 80 + annotations: all + package-manager: yarn From e7f2bb40692de9644ecd0c01372cd551abc1c7ea Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:18:37 +0530 Subject: [PATCH 03/22] fix yaml --- .github/workflows/tests-coverage.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index e5d26d0..4725f10 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -10,7 +10,3 @@ jobs: steps: - uses: actions/checkout@v2 - uses: artiomtr/jest-coverage-report-action@v1.3 - with: - threshold: 80 - annotations: all - package-manager: yarn From cf27aff36947d95019c70de633c4f82b240999b8 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:29:31 +0530 Subject: [PATCH 04/22] fix yaml --- .github/workflows/tests-coverage.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 4725f10..8f45517 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,12 +1,14 @@ -name: Coverage report +name: "coverage" on: - pull_request: - branches: - - develop - - main + pull_request: + branches: + - master + - main jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: artiomtr/jest-coverage-report-action@v1.3 + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ArtiomTr/jest-coverage-report-action@v2 + with: + github-token: ${{ secrets.SECRET_TOKEN }} From 1dd8faddff75aea61feade4921a216b823267c28 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:35:10 +0530 Subject: [PATCH 05/22] fix yaml --- .github/workflows/tests-coverage.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 8f45517..3bf2fa4 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,14 +1,16 @@ -name: "coverage" +name: Coverage report on: - pull_request: - branches: - - master - - main + pull_request: + branches: + - develop + - main + jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ArtiomTr/jest-coverage-report-action@v2 - with: - github-token: ${{ secrets.SECRET_TOKEN }} + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: artiomtr/jest-coverage-report-action@v1.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + # threshold: 80 # optional parameter From b33027289e9a7ca3413f39cd89510f54d4f0b411 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:36:24 +0530 Subject: [PATCH 06/22] fix yaml --- .github/workflows/tests-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 3bf2fa4..5000162 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -12,5 +12,5 @@ jobs: - uses: actions/checkout@v2 - uses: artiomtr/jest-coverage-report-action@v1.3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} # threshold: 80 # optional parameter From c1948a6c52e173beb74a6f2b11a2d77944b74e90 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sun, 26 Feb 2023 01:39:06 +0530 Subject: [PATCH 07/22] fix package manager to yarn --- .github/workflows/tests-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 5000162..04ca353 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -13,4 +13,4 @@ jobs: - uses: artiomtr/jest-coverage-report-action@v1.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - # threshold: 80 # optional parameter + package-manager: yarn From 1ee4f58038cf67f37eb33325a62ad36a28bf3f42 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 01:39:12 +0530 Subject: [PATCH 08/22] Update actions --- .github/workflows/tests-coverage.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 04ca353..1b508d7 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,16 +1,16 @@ name: Coverage report -on: - pull_request: - branches: - - develop - - main - +'on': + pull_request: + branches: + - develop + - main jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: artiomtr/jest-coverage-report-action@v1.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - package-manager: yarn + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Jest coverage report + - uses: ArtiomTr/jest-coverage-report-action@v2.2.1 + with: + github_token: '${{ secrets.GITHUB_TOKEN }}' + package-manager: yarn From f3d88219ff105a770e30433f1775b58b3109c9c2 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 01:44:56 +0530 Subject: [PATCH 09/22] Update actions --- .github/workflows/tests-coverage.yml | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 1b508d7..f859983 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,16 +1,18 @@ name: Coverage report -'on': - pull_request: - branches: - - develop - - main +on: + pull_request: + branches: + - develop + - main + jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Jest coverage report - - uses: ArtiomTr/jest-coverage-report-action@v2.2.1 - with: - github_token: '${{ secrets.GITHUB_TOKEN }}' - package-manager: yarn + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout Branch To Runner + uses: actions/checkout@v3 + - name: Jest coverage report + uses: ArtiomTr/jest-coverage-report-action@v2.2.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + package-manager: yarn From eee315ae4f20df21942c8a5871426c901d673dce Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 01:46:13 +0530 Subject: [PATCH 10/22] Update actions github-token --- .github/workflows/tests-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index f859983..eb167b7 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -14,5 +14,5 @@ jobs: - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn From 91a846686cc2448c4fb557c3d8632814213ebb21 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 01:56:20 +0530 Subject: [PATCH 11/22] Update actions --- .github/workflows/tests-coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index eb167b7..8a9791d 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -14,5 +14,6 @@ jobs: - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn + test-script: yarn test:ci + annotations: all From eb58f5e235ec22b503c30ed4e722e84c7f18de1b Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:05:46 +0530 Subject: [PATCH 12/22] Update actions --- .github/workflows/tests-coverage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 8a9791d..b525491 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -11,9 +11,15 @@ jobs: steps: - name: Checkout Branch To Runner uses: actions/checkout@v3 + - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 + id: coverage with: package-manager: yarn test-script: yarn test:ci annotations: all + output: comment, report-markdown + + - name: Write to Job Summary + run: ${{ steps.coverage.outputs.report }} >> $GITHUB_STEP_SUMMARY From 61b6f7182816ebf168e1cf335c2fed1988c49406 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:15:48 +0530 Subject: [PATCH 13/22] Update actions --- .github/workflows/tests-coverage.yml | 4 ++-- jest.config.js | 8 ++++---- package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index b525491..15eda1c 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -1,4 +1,4 @@ -name: Coverage report +name: Test with Coverage report on: pull_request: branches: @@ -22,4 +22,4 @@ jobs: output: comment, report-markdown - name: Write to Job Summary - run: ${{ steps.coverage.outputs.report }} >> $GITHUB_STEP_SUMMARY + run: echo ${{ steps.coverage.outputs.report }} >> $GITHUB_STEP_SUMMARY diff --git a/jest.config.js b/jest.config.js index c862435..b9c978a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,10 +9,10 @@ module.exports = { reporters: [['github-actions', { silent: false }], 'summary'], coverageThreshold: { global: { - branches: 100, - functions: 100, - lines: 100, - statements: 100, + branches: 70, + functions: 70, + lines: 70, + statements: 70, }, }, }; diff --git a/package.json b/package.json index e9c8824..123e464 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "start": "remix-serve build", "prepare": "husky install", "test": "jest", - "test:ci": "jest --coverage --silent --ci", + "test:ci": "jest --ci --json --coverage --testLocationInResults --outputFile=report.json", "sb": "start-storybook -p 6006", "build-sb": "build-storybook" }, From 49e634ca7d7c9a63eb1625496d781d29e762f0b1 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:16:50 +0530 Subject: [PATCH 14/22] Revert coverage threshold --- jest.config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jest.config.js b/jest.config.js index b9c978a..c862435 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,10 +9,10 @@ module.exports = { reporters: [['github-actions', { silent: false }], 'summary'], coverageThreshold: { global: { - branches: 70, - functions: 70, - lines: 70, - statements: 70, + branches: 100, + functions: 100, + lines: 100, + statements: 100, }, }, }; From 0d44a8b323ea5c18e86b5992aff4c774950319ac Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:21:51 +0530 Subject: [PATCH 15/22] Update actions --- .github/workflows/tests-coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 15eda1c..56f354d 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -22,4 +22,5 @@ jobs: output: comment, report-markdown - name: Write to Job Summary - run: echo ${{ steps.coverage.outputs.report }} >> $GITHUB_STEP_SUMMARY + env: + GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} From 95fef7367a2c1009b9f3e01158095cc7ce5f83d5 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:40:52 +0530 Subject: [PATCH 16/22] Update actions --- .github/workflows/tests-coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 56f354d..ff23d9e 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -22,5 +22,6 @@ jobs: output: comment, report-markdown - name: Write to Job Summary + run: echo "Adding coverage to GITHUB_STEP_SUMMARY" env: GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} From 44b6090d310340e6e55e1403bb91227aae38875c Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:49:41 +0530 Subject: [PATCH 17/22] Update actions --- .github/workflows/tests-coverage.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index ff23d9e..d47aadf 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -20,8 +20,10 @@ jobs: test-script: yarn test:ci annotations: all output: comment, report-markdown - - - name: Write to Job Summary - run: echo "Adding coverage to GITHUB_STEP_SUMMARY" - env: + env: GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} + + # - name: Write to Job Summary + # run: echo "Adding coverage to GITHUB_STEP_SUMMARY" + # env: + # GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} From e21cdbbed013923f3d33280e22d6c43699aa56f5 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:50:21 +0530 Subject: [PATCH 18/22] Update actions --- .github/workflows/tests-coverage.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index d47aadf..aeb6fb0 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -11,7 +11,6 @@ jobs: steps: - name: Checkout Branch To Runner uses: actions/checkout@v3 - - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 id: coverage @@ -21,9 +20,4 @@ jobs: annotations: all output: comment, report-markdown env: - GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} - - # - name: Write to Job Summary - # run: echo "Adding coverage to GITHUB_STEP_SUMMARY" - # env: - # GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} + GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} \ No newline at end of file From 4d302543c2724d63f017a05476983b948344f350 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:51:06 +0530 Subject: [PATCH 19/22] Update actions --- .github/workflows/tests-coverage.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index aeb6fb0..001006c 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -11,6 +11,7 @@ jobs: steps: - name: Checkout Branch To Runner uses: actions/checkout@v3 + - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 id: coverage @@ -19,5 +20,10 @@ jobs: test-script: yarn test:ci annotations: all output: comment, report-markdown - env: - GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} \ No newline at end of file + env: + GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} + + # - name: Write to Job Summary + # run: echo "Adding coverage to GITHUB_STEP_SUMMARY" + # env: + # GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} From a72d3186786ab05d033925dc4eda3035300b6c1d Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:51:37 +0530 Subject: [PATCH 20/22] Update actions --- .github/workflows/tests-coverage.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 001006c..9f43157 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -11,7 +11,6 @@ jobs: steps: - name: Checkout Branch To Runner uses: actions/checkout@v3 - - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 id: coverage From 791b9713bcb80387a5da562543d04aaddb9c8386 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:52:23 +0530 Subject: [PATCH 21/22] Update actions --- .github/workflows/tests-coverage.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 9f43157..1e2970d 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -11,6 +11,7 @@ jobs: steps: - name: Checkout Branch To Runner uses: actions/checkout@v3 + - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 id: coverage @@ -19,10 +20,7 @@ jobs: test-script: yarn test:ci annotations: all output: comment, report-markdown - env: - GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} + env: + GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} # - name: Write to Job Summary - # run: echo "Adding coverage to GITHUB_STEP_SUMMARY" - # env: - # GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} From 7e0931bb969bf3bf58651837e088fe323b6a4ed0 Mon Sep 17 00:00:00 2001 From: Prakash Date: Sat, 4 Mar 2023 02:55:36 +0530 Subject: [PATCH 22/22] Update actions --- .github/workflows/tests-coverage.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml index 1e2970d..3a29168 100644 --- a/.github/workflows/tests-coverage.yml +++ b/.github/workflows/tests-coverage.yml @@ -14,13 +14,7 @@ jobs: - name: Jest coverage report uses: ArtiomTr/jest-coverage-report-action@v2.2.1 - id: coverage with: package-manager: yarn test-script: yarn test:ci annotations: all - output: comment, report-markdown - env: - GITHUB_STEP_SUMMARY: ${{ steps.coverage.outputs.report }} - - # - name: Write to Job Summary