Skip to content

Commit

Permalink
🌱 Update codecov settings, make coverage non-blocking (konveyor#1217)
Browse files Browse the repository at this point in the history
Summary of changes:
  - 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

References:
  - Non-blocking: https://docs.codecov.com/docs/common-recipe-list#set-non-blocking-status-checks
  - Flags: https://docs.codecov.com/docs/flags
  - `target: auto`: https://docs.codecov.com/docs/commit-status#target

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 authored Jul 27, 2023
1 parent 9a3987b commit 6ab92d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if: ${{ github.ref == 'refs/heads/main' }} || ${{ github.base_ref == 'refs/heads/main'}}

- name: Upload to codecov (client)
uses: codecov/codecov-action@v1
with:
flags: client
directory: ./*/coverage

- name: Upload to codecov (server)
uses: codecov/codecov-action@v1
with:
flags: unitests
flags: server
directory: ./*/coverage
29 changes: 17 additions & 12 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
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

flags:
unitests:
carryforward: false
e2etests:
carryforward: false
client:
paths:
- client/
server:
paths:
- server/

0 comments on commit 6ab92d3

Please sign in to comment.