Closed
Description
Description
The codecov github action seems to randomly fail, at least in PRs, even when the change in the PR doesn't affect source code or tests.
Minimal code-snippet showcasing the problem
Make a PR and run the test action.
See example: https://github.com/typestack/class-validator/actions/runs/11377772092/job/31656989112?pr=2542
Expected behavior
Codecov shouldn't start failing when it succeeded during the last push to main.
Actual behavior
Some string that we want to .split
appears to be undefined. Here's the full log:
Run codecov -f ./coverage/clover.xml -t --commit=$GITHUB_SHA --branch=${GITHUB_REF##*/}
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v3.8.2
==> Detecting CI Provider
GitHub Actions CI Detected
==> Configuration:
Endpoint: https://codecov.io
{
commit: '9d88728636805dd[4](https://github.com/typestack/class-validator/actions/runs/11377772092/job/31656989112?pr=2542#step:7:5)87072da397ef79[5](https://github.com/typestack/class-validator/actions/runs/11377772092/job/31656989112?pr=2542#step:7:6)6be25de2c',
branch: 'merge',
package: 'node-v3.8.2'
}
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /home/runner/work/class-validator/class-validator -type f -name '*.gcno' -exec gcov {} +
Failed to run gcov command.
==> Targeting specific file
+ /home/runner/work/class-validator/class-validator/coverage/clover.xml
==> Uploading reports
(node:2022) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/opt/hostedtoolcache/node/23.0.0/x[6](https://github.com/typestack/class-validator/actions/runs/11377772092/job/31656989112?pr=2542#step:7:7)4/lib/node_modules/codecov/lib/codecov.js:213
var codecov_report_url = result.split('\n')[0]
^
TypeError: result.split is not a function
at /opt/hostedtoolcache/node/23.0.0/x64/lib/node_modules/codecov/lib/codecov.js:213:41
at /opt/hostedtoolcache/node/23.0.0/x64/lib/node_modules/codecov/node_modules/teeny-request/build/src/index.js:210:1[7](https://github.com/typestack/class-validator/actions/runs/11377772092/job/31656989112?pr=2542#step:7:8)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v23.0.0
Error: Process completed with exit code 1.