Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable codecov support #312

Merged
merged 4 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,18 @@ 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)
if: ${{ github.event_name == 'push' }}
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flag_management:
default_rules:
carryforward: true
12 changes: 0 additions & 12 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
};