Skip to content

Commit f806d0a

Browse files
committed
ci(workflows): [ci] upload coverage report to codecov
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent fb5eeb7 commit f806d0a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# - https://github.com/actions/setup-node
1818
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
1919
# - https://github.com/actions/upload-artifact
20+
# - https://github.com/codecov/codecov-action
2021
# - https://github.com/hmarr/debug-action
2122

2223
---
@@ -253,6 +254,26 @@ jobs:
253254
- id: test
254255
name: Run tests
255256
run: yarn test:cov --segfault-retry=3
257+
- id: codecov
258+
name: Upload coverage report to Codecov
259+
uses: codecov/codecov-action@v3.1.1
260+
with:
261+
env_vars: GITHUB_JOB,GITHUB_REF,GITHUB_REF_TYPE,GITHUB_RUN_ID,GITHUB_SHA,GITHUB_WORKSPACE
262+
fail_ci_if_error: true
263+
file: ./coverage/lcov.info
264+
flags: ${{ format('node{0}', matrix.node-version) }}
265+
override_branch: ${{ env.REF }}
266+
override_build: ${{ github.run_id }}
267+
override_commit: ${{ env.GITHUB_SHA }}
268+
token: ${{ secrets.CODECOV_TOKEN }}
269+
verbose: true
270+
env:
271+
GITHUB_JOB: ${{ github.job }}
272+
GITHUB_REF: ${{ github.ref }}
273+
GITHUB_REF_TYPE: ${{ github.ref_type }}
274+
GITHUB_RUN_ID: ${{ github.run_id }}
275+
GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
276+
GITHUB_WORKSPACE: ${{ github.workspace }}
256277
build:
257278
needs: metadata
258279
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)