codecov / codecov/codecov-action
fail_ci_if_error should default to true
@thomasrockhu-codecov is already working on this.
Since Oct 31, 2024.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 260
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 1
Description
Splitting out of discussion in #1293: right now, if a repository uses v4 of the action without a CODECOV_TOKEN, their build will fail to upload coverage data but still ✅ pass. The logs will look something like this (example run):
==> Uploader SHASUM verified (e3ea28a069fe174eb99ac2ffb523bfb55d5d29a7cfd93ef48cde12e9b552b492 codecov)
info - 2024-03-29 13:16:58,766 -- ci service found: github-actions
warning - 2024-03-29 13:16:58,778 -- No config file could be found. Ignoring config.
Error: Codecov token not found. Please provide Codecov token with -t flag.
Warning: Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1
The action not failing on an explicit Error: is surprising behavior. If an action fails to do its express purpose, you'd expect it to fail.
Furthermore, many repositories automatically create dependency update PRs for GitHub actions. Even if they're not automatically merged, it's easy to miss in the three error/warning lines that one of them is new and actually matters now.
Separately from requests to re-allow tokenless uploading, could you please change fail_ci_if_error's default from false to true in a new major version, please?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.