Skip to content

Commit bb3b340

Browse files
ci: gate Code Coverage on github.repository instead of token presence
The previous commit (51bb5c8) gated the Code Coverage job on `secrets.CODECOV_TOKEN != ''`. That breaks if upstream relies on tokenless / OIDC upload — they wouldn't have the secret set, and the job would skip on `vitessio/vitess` too. Switch to the same pattern we already use for runner selection: `if: github.repository == 'vitessio/vitess'`. Coverage runs on upstream unconditionally, and forks skip without burning ~16 minutes of unit tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
1 parent 51bb5c8 commit bb3b340

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ permissions: read-all
1616
jobs:
1717
test:
1818
name: Code Coverage
19-
# Skip the whole job when no CODECOV_TOKEN is available — without one the
20-
# final upload step fails ("Token required - not valid tokenless upload"),
21-
# so running the test suite just to throw the report away is wasted work.
22-
# Forks that want coverage can opt in by configuring CODECOV_TOKEN.
23-
if: ${{ secrets.CODECOV_TOKEN != '' }}
19+
# Skip on forks: the upload step requires CODECOV_TOKEN, which isn't
20+
# configured on forks, and Codecov no longer allows tokenless uploads
21+
# ("Token required - not valid tokenless upload"). Without this gate
22+
# we'd burn ~16 minutes on the test suite just to red-fail the upload.
23+
if: ${{ github.repository == 'vitessio/vitess' }}
2424
runs-on: ${{ github.repository == 'vitessio/vitess' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
2525

2626
steps:

0 commit comments

Comments
 (0)