Commit 51bb5c8
ci: skip Code Coverage job when CODECOV_TOKEN isn't available
The Upload step in codecov.yml has `fail_ci_if_error: true`, so when
the workflow runs on a fork (or anywhere else without
`secrets.CODECOV_TOKEN`) the upload returns:
Token required - not valid tokenless upload
==> Failed to create-commit
…and the whole job goes red even though the test suite passed.
Gate the entire job on `secrets.CODECOV_TOKEN != ''` so forks skip
both the test run and the upload — running unit tests just to throw
away the coverage report is wasted CI time. Anyone who actually wants
the coverage can opt in by configuring the secret on their fork.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
(cherry picked from commit dea0555)1 parent 248182c commit 51bb5c8
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
0 commit comments