codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

Error during upload doesn't fail action

Open tobiasdiez opened this issue 1 year ago • 2 comments

The action fails with the messages

 warning - 2024-03-21 14:32:57,088 -- 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

but the step is actually shown as "successful" in the github interface. It would be good to actually fail in case there is an error.

Example: https://github.com/apollo-server-integrations/apollo-server-integration-h3/actions/runs/8376730386/job/22937079972?pr=51

tobiasdiez avatar Mar 21 '24 14:03 tobiasdiez

Just enable the fail_ci_if_error option, coz by default it is false.

dwisiswant0 avatar Mar 22 '24 05:03 dwisiswant0

This is a bad default, I would opt for changing it to true, or inverting the flag.

tomage avatar Apr 16 '24 19:04 tomage