Skip to content

Commit

Permalink
fix: upload-coverage failed in master
Browse files Browse the repository at this point in the history
When action don't run on pull request, Codecov GitHub Action V4 need token.
Refence:
1. https://github.com/codecov/codecov-action?tab=readme-ov-file#breaking-changes
2. https://docs.codecov.com/docs/codecov-uploader#supporting-token-less-uploads-for-forks-of-open-source-repos-using-codecov

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
  • Loading branch information
Desiki-high committed Jun 4, 2024
1 parent 4a16402 commit 104af3e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,19 @@ jobs:
with:
name: contrib-test-coverage-artifact
- name: Upload coverage to Codecov
if: ${{ github.event_name == 'pull_request' }}
uses: codecov/codecov-action@v4
with:
files: ./codecov.json,./coverage.txt
verbose: true
fail_ci_if_error: true
- name: Upload coverage to Codecov
if: if: ${{ (github.event_name == 'push'|| github.event_name == 'schedule') }}
uses: codecov/codecov-action@v4
with:
files: ./codecov.json,./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

nydus-cargo-deny:
Expand Down

0 comments on commit 104af3e

Please sign in to comment.