Skip to content

Commit

Permalink
Update codecov settings, make coverage non-blocking
Browse files Browse the repository at this point in the history
  - 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 <[email protected]>
  • Loading branch information
sjd78 committed Jul 27, 2023
1 parent 9a3987b commit b2b7740
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 14 deletions.
15 changes: 13 additions & 2 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)
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
44 changes: 32 additions & 12 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b2b7740

Please sign in to comment.