Skip to content

Commit 02337e6

Browse files
committed
try to fix coverage repots
1 parent fb194fe commit 02337e6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,15 @@ jobs:
8989
if-no-files-found: error
9090

9191
- name: Upload to Codecov (optional)
92-
if: always()
92+
# CODECOV_TOKEN is not available to PRs from forks.
93+
if: |
94+
always() && (
95+
github.event_name == 'push' ||
96+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
97+
)
9398
uses: codecov/codecov-action@v5
9499
with:
95100
files: coverage.xml
96-
fail_ci_if_error: false
101+
token: ${{ secrets.CODECOV_TOKEN }}
102+
fail_ci_if_error: true
97103
verbose: true

0 commit comments

Comments
 (0)