From 80e4d2c6784fb58ac5f189834de8ba27c1443e5a Mon Sep 17 00:00:00 2001 From: Md Junaed Hossain <169046794+junaed-optimizely@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:39:36 +0600 Subject: [PATCH] [FSSDK-10437] jest coverage report job addition (#281) * [FSSDK-10437] jest coverage report job addition * [FSSDK-10437] local script addition * [FSSDK-10437] job name and title adjustment * [FSSDK-10437] package manager & pre-requisite addition --- .github/workflows/react.yml | 11 +++++++++++ package.json | 1 + 2 files changed, 12 insertions(+) diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index d03559c..d4c298e 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -24,6 +24,17 @@ jobs: run: yarn install - name: Run tests run: yarn test + + coverage: + name: Jest Coverage Report + runs-on: ubuntu-latest + needs: [ unitTests ] + steps: + - uses: actions/checkout@v3 + - uses: ArtiomTr/jest-coverage-report-action@v2 + with: + custom-title: 'Jest Coverage Report' + package-manager: 'yarn' integration_tests: name: Run integration tests diff --git a/package.json b/package.json index 708d1a5..f1c8816 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "build:win": "(if exist dist rd /s/q dist) && node ./scripts/winbuild.js", "lint": "tsc --noEmit && eslint 'src/**/*.{js,ts,tsx}' --quiet --fix", "test": "jest --silent", + "test-coverage": "jest --coverage --coverageReporters=\"text-summary\" --silent", "prepublishOnly": "npm run test && npm run build", "prepare": "npm run build && husky install" },