From b2b7740be9a11c9e1944011778ecaf76b4dc3d5e Mon Sep 17 00:00:00 2001 From: Scott J Dickerson Date: Thu, 27 Jul 2023 14:22:47 -0400 Subject: [PATCH] Update codecov settings, make coverage non-blocking - add projects and flags for `client` and `server`, but make the coverage tests non-blocking - disable the `default` project and just rely on the flagged projects - remove `unitests` and `e2etests` projects and flags since they don't make sense in the current repo - github workflow `ci-actions.yml` updated to upload coverage once for each flag Signed-off-by: Scott J Dickerson --- .github/workflows/ci-actions.yml | 15 +++++++++-- codecov.yml | 44 +++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index 97d5ff92f0..8a8138ed1c 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -18,21 +18,32 @@ jobs: strategy: matrix: node-version: [18.x] + steps: - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Install run: npm clean-install + - name: Build run: npm run build + - name: Test run: npm run test -- --coverage --watchAll=false + + - name: Code coverage (PR to main or push to main) + uses: codecov/codecov-action@v1 + with: + flags: client + directory: ./*/coverage + - name: Code coverage (PR to main or push to main) - if: ${{ github.ref == 'refs/heads/main' }} || ${{ github.base_ref == 'refs/heads/main'}} uses: codecov/codecov-action@v1 with: - flags: unitests + flags: server directory: ./*/coverage diff --git a/codecov.yml b/codecov.yml index 1d4847ec91..27be9f6751 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,19 +1,39 @@ coverage: status: project: - default: - target: 75% - unitests: - target: 30% + default: false + + client: + informational: true + target: auto flags: - - unitests - e2etests: - target: 70% + - client + + server: + informational: true + target: auto flags: - - e2etests + - server + + # unitests: + # target: 30% + # flags: + # - unitests + + # e2etests: + # target: 70% + # flags: + # - e2etests flags: - unitests: - carryforward: false - e2etests: - carryforward: false + client: + paths: + - client/ + server: + paths: + - server/ + + # unitests: + # carryforward: false + # e2etests: + # carryforward: false