Skip to content

Commit

Permalink
Upload coverage report using CODECOV_TOKEN (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 committed May 20, 2024
1 parent 7a61d94 commit 50829ea
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,19 @@ jobs:
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-restore --collect "XPlat Code Coverage"
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage to codecov (tokenless)
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
- name: Upload coverage to codecov (with token)
if: >
github.repository == 'TheAlgorithms/C-Sharp' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

0 comments on commit 50829ea

Please sign in to comment.