codecov / codecov-action

GitHub Action that uploads coverage to Codecov :open_umbrella:
https://www.codecov.io
MIT License
1.47k stars 205 forks source link

Action succeeds even if upload fails #917

Closed richvdh closed 1 year ago

richvdh commented 1 year ago

The upload failed, for github reasons I haven't entirely grokked:

Run codecov/codecov-action@v3
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (20f9c9d78483fce977b6cc39e231a734a23bcd36f4d536bb7355222fb88d02bc  codecov)
==> Running version latest
==> Running version v0.3.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.1 -C b4e729fbbe28c76f171ba8f0ae6a411d2c482d09
[2023-02-15T12:49:11.059Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2023-02-15T12:49:11.075Z] ['info'] => Project root located at: /home/runner/work/matrix-rust-sdk/matrix-rust-sdk
[2023-02-15T12:49:11.081Z] ['info'] -> No token specified or token is empty
[2023-02-15T12:49:11.091Z] ['info'] Searching for coverage files...
[2023-02-15T12:49:11.566Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-02-15T12:49:11.566Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-02-15T12:49:11.566Z] ['info'] => Found 4 possible coverage files:
  cobertura.xml
  codecov.yaml
  .github/workflows/coverage.yml
  target/tarpaulin/coverage.json
[2023-02-15T12:49:11.566Z] ['info'] Processing /home/runner/work/matrix-rust-sdk/matrix-rust-sdk/cobertura.xml...
[2023-02-15T12:49:11.570Z] ['info'] Processing /home/runner/work/matrix-rust-sdk/matrix-rust-sdk/codecov.yaml...
[2023-02-15T12:49:11.571Z] ['info'] Processing /home/runner/work/matrix-rust-sdk/matrix-rust-sdk/.github/workflows/coverage.yml...
[2023-02-15T12:49:11.572Z] ['info'] Processing /home/runner/work/matrix-rust-sdk/matrix-rust-sdk/target/tarpaulin/coverage.json...
[2023-02-15T12:49:11.618Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-02-15T12:49:11.619Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=rav%2Fcrypto-js_debug_mode&build=4183942249&build_url=https%3A%2F%2Fgithub.com%2Fmatrix-org%2Fmatrix-rust-sdk%2Factions%2Fruns%2F4183942249&commit=b4e729fbbe28c76f171ba8f0ae6a411d2c482d09&job=Code+coverage&pr=1510&service=github-actions&slug=matrix-org%2Fmatrix-rust-sdk&name=&tag=&flags=&parent=
[2023-02-15T12:49:11.901Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

... and yet the workflow still completed successfully. If the coverage upload fails, this should be reported back as a failed workflow.

(This was https://github.com/matrix-org/matrix-rust-sdk/actions/runs/4183942249/jobs/7248944386)

richvdh commented 1 year ago

Oh, I think I just need fail_ci_if_error: true. My bad for not reading the fine manual, though I'm surprised it's not the default.

richvdh commented 1 year ago

(the failure was due to the much-reported and upvoted https://github.com/codecov/feedback/issues/126)