Skip to content

Commit 1332188

Browse files
committed
ci(workflows): [ci] upload coverage report to codecov
Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 1855fb7 commit 1332188

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# - https://github.com/actions/checkout
1616
# - https://github.com/actions/setup-node
1717
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
18-
# - https://github.com/actions/upload-artifact
18+
# - https://github.com/codecov/codecov-action
1919
# - https://github.com/hmarr/debug-action
2020

2121
---
@@ -231,6 +231,26 @@ jobs:
231231
- id: test
232232
name: Run tests
233233
run: yarn test:cov --segfault-retry=3
234+
- id: codecov
235+
name: Upload coverage report to Codecov
236+
uses: codecov/[email protected]
237+
with:
238+
env_vars: GITHUB_JOB,GITHUB_REF,GITHUB_REF_TYPE,GITHUB_RUN_ID,GITHUB_SHA,GITHUB_WORKSPACE
239+
fail_ci_if_error: true
240+
file: ./coverage/lcov.info
241+
flags: ${{ format('node{0}', matrix.node-version) }}
242+
override_branch: ${{ env.REF }}
243+
override_build: ${{ github.run_id }}
244+
override_commit: ${{ github.sha }}
245+
token: ${{ secrets.CODECOV_TOKEN }}
246+
verbose: true
247+
env:
248+
GITHUB_JOB: ${{ github.job }}
249+
GITHUB_REF: ${{ github.ref }}
250+
GITHUB_REF_TYPE: ${{ github.ref_type }}
251+
GITHUB_RUN_ID: ${{ github.run_id }}
252+
GITHUB_SHA: ${{ github.sha }}
253+
GITHUB_WORKSPACE: ${{ github.workspace }}
234254
build:
235255
needs: metadata
236256
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)