diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 63a1030edb..0db10c7f4f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -74,7 +74,7 @@ jobs: - name: Test (Pull Request) if: ${{ github.event_name == 'pull_request' }} run: | - npm run test:ci -- --changedSince origin/${{ github.event.pull_request.base.ref }} + npm run test:ci -- --changedSince origin/${{ github.event.pull_request.base.ref }} --collectCoverage=true npm run test:golden-layout - name: Test (Push) @@ -82,3 +82,10 @@ jobs: run: | npm run test:ci -- --lastCommit npm run test:golden-layout + + - name: Codecov report + uses: codecov/codecov-action@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unit diff --git a/README.md b/README.md index 817eb1e8aa..701a84ea02 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ We're using a monorepo to manage our packages, as it becomes cumbersome to manage the overhead of multiple repos with how we wish to develop the Enterprise UI, while maintaining a separate OSS Code Studio solution. Using `lerna` to manage all of our packages in one repo simplifies the process. +[![codecov](https://codecov.io/gh/deephaven/web-client-ui/branch/main/graph/badge.svg?token=RW29S9X72C)](https://codecov.io/gh/deephaven/web-client-ui) + ## Getting Started We are still using node 14.x and npm 6.x. If you are [using nvm](https://github.com/nvm-sh/nvm#installing-and-updating), run `nvm install lts/fermium` to get the latest 14.x/6.x versions. Otherwise, download from the [node homepage](https://nodejs.org/en/download/). diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..b7052f68ce --- /dev/null +++ b/codecov.yml @@ -0,0 +1,3 @@ +flag_management: + default_rules: + carryforward: true diff --git a/jest.config.cjs b/jest.config.cjs index 520e5a5512..427853f857 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -22,16 +22,4 @@ module.exports = { ], collectCoverage: false, collectCoverageFrom: ['./src/**/*.{js,ts,jsx,tsx}'], // This is relative to individual project root due to how Jest handles it - coverageThreshold: { - // These global thresholds were taken as the baseline of the overall project when code coverage initiative began. - // In CI, these thresholds will be measures against only the files you have changed. - // We may want to increase/decrease the thresholds for specific projects, and we can do that: - // https://jestjs.io/docs/configuration#coveragethreshold-object - global: { - statements: 40, - branches: 30, - functions: 30, - lines: 40, - }, - }, };