Skip to content

Commit 1fff40f

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

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)