Skip to content

Commit 827a5e5

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

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
@@ -12,6 +12,7 @@
1212
# - https://github.com/actions/setup-node
1313
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
1414
# - https://github.com/actions/upload-artifact
15+
# - https://github.com/codecov/codecov-action
1516
# - https://github.com/hmarr/debug-action
1617

1718
---
@@ -100,3 +101,23 @@ jobs:
100101
name: |
101102
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.version.outputs.result) }}
102103
path: '*.tgz'
104+
- id: codecov
105+
name: Upload coverage report to Codecov
106+
uses: codecov/codecov-action@v3.1.1
107+
with:
108+
env_vars: GITHUB_JOB,GITHUB_REF,GITHUB_REF_TYPE,GITHUB_RUN_ID,GITHUB_SHA,GITHUB_WORKSPACE
109+
fail_ci_if_error: true
110+
file: ./coverage/lcov.info
111+
flags: ${{ format('node{0}', matrix.node-version) }}
112+
override_branch: ${{ env.REF }}
113+
override_build: ${{ github.run_id }}
114+
override_commit: ${{ github.sha }}
115+
token: ${{ secrets.CODECOV_TOKEN }}
116+
verbose: true
117+
env:
118+
GITHUB_JOB: ${{ github.job }}
119+
GITHUB_REF: ${{ github.ref }}
120+
GITHUB_REF_TYPE: ${{ github.ref_type }}
121+
GITHUB_RUN_ID: ${{ github.run_id }}
122+
GITHUB_SHA: ${{ github.sha }}
123+
GITHUB_WORKSPACE: ${{ github.workspace }}

0 commit comments

Comments
 (0)