ci: use codecov to upload coverage report (#1583)

This commit is contained in:
Leo Q 2024-06-30 16:12:16 +08:00 committed by GitHub
parent 5a58426859
commit 8cc1ee6360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,14 +45,12 @@ jobs:
code_coverage:
name: "Code coverage report"
if: github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
runs-on: ubuntu-latest
needs: unit_tests # Depends on the artifact uploaded by the "unit_tests" job
steps:
- uses: fgrosse/go-coverage-report@v1.0.2 # Consider using a Git revision for maximum security
- uses: codecov/codecov-action@v4
with:
coverage-artifact-name: "code-coverage" # can be omitted if you used this default value
coverage-file-name: "coverage.txt" # can be omitted if you used this default value
use_oidc: true
commit_lint:
runs-on: ubuntu-latest