Unusable report using codecov-action@v3, bash uploader works well

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.
I understand that the community boards are a free, best-effort tool. While we hope to have someone on the Codecov team resolve your problem quickly, this is not always possible.

Description

Unusable report” using codecov-action@v3. Code coverage equals 0. Fixing file paths does not help (or does not work?). The bash uploader works well.

CI/CD URL

Codecov Output

The full output of running the uploader is too long (An error occurred: Body is limited to 32000 characters; you entered 85107). It can be viewed at test: new COVERAGE · ldorau/rpma@043da06 · GitHub at the “Upload coverage to Codecov” step.

Expected Results

Usable report using codecov-action@v3. Code coverage should be the same like in the case of the bash uploader on the main branch (Codecov).

Actual Results

Unusable report using codecov-action@v3.

Additional Information

  1. The branch with the codecov-action@v3 uploader:
  1. The “main” branch with the bash uploader:

@dluki, I’ll take a look, but the first thing I noticed is that your coverage reports are pretty empty. Let me know if that rings any bells.


On the commit page,
image

and look at the coverage reports after the list of files.

Thanks for your reply!
Yes, I know, but I do not know why they are empty…

There is a part of Codecov output:

File '/rpma/src/conn_cfg.c'
Lines executed:100.00% of 104
No branches
No calls
Creating '#rpma#src#conn_cfg.c.gcov'

File '/rpma/src/conn_req.c'
Lines executed:100.00% of 232
No branches
No calls
Creating '#rpma#src#conn_req.c.gcov'

100% of lines are executed, but there are: “No branches” and “No calls” - is it OK?
By the way, the relative paths of the above files inside of the git repo are:

  • src/conn_cfg.c (instead of ‘/rpma/src/conn_cfg.c’) and
  • src/conn_req.c (instead of ‘/rpma/src/conn_req.c’).

So /rpma/ could be removed, but fixing paths using the codecov.yml file:

fixes:
  - "/home/runner/work/rpma/rpma/::"
  - "/rpma/::"
  - "rpma/::"

does not fix that …

@dluki, hmm, I’d like to compare the Codecov outputs fully. Would you be able to link a URL pointing to the Codecov upload when using the bash uploader?

@tom This is the last Codecov upload when using the bash uploader:
https://app.codecov.io/github/pmem/rpma/commit/8d8f24c3ae92fd6d5be6d97ac626282e7c706498

and the last using the codecov-action@v3 uploader:

@tom When codecov.yml contains only:

fixes:
  - "rpma/::"

the result is the same:

rpma/src/conn.c
rpma/src/conn.h
rpma/src/conn_cfg.c
rpma/src/conn_cfg.h
rpma/src/conn_req.c
rpma/src/conn_req.h
rpma/src/cq.c

@tom This is the last Codecov upload when using the bash uploader:

@dluki sorry for the delay here. I had an idea and was working on a fix. Could you try running the action again, I just released a new version of it.

@tom I have re-run the last build and it detects only one (not a source) file now:
[2023-04-12T09:18:49.367Z] [‘info’] => Found 1 possible coverage files: rpma/.github/workflows/coverage.yml

See:

@tom see the last build:

Hi @tom, do you have any ideas what can be wrong here?

@dluki it looks like you were using a bunch of different args with the bash uploader here

Specifically, setting gcovexe

	clang_used=$($CMAKE -LA -N . | grep CMAKE_C_COMPILER | grep clang | wc -c)
	if [[ $clang_used > 0 ]]; then
		gcovexe="llvm-cov gcov"
	else
		gcovexe="gcov"
	fi

I suspect maybe you need to add to the Action

  gcov_executable: llvm-cov gcov

but that is my best guess.

@tom The result is following:

[2023-04-21T12:31:21.822Z] ['verbose'] coveragepy is not installed
[2023-04-21T12:31:21.822Z] ['info'] Searching for coverage files...
[2023-04-21T12:31:22.036Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-04-21T12:31:22.036Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-04-21T12:31:22.037Z] ['verbose'] Preparing to clean the following coverage paths: .github/workflows/coverage.yml
[2023-04-21T12:31:22.038Z] ['info'] => Found 1 possible coverage files:
  .github/workflows/coverage.yml
[2023-04-21T12:31:22.038Z] ['verbose'] End of network processing
[2023-04-21T12:31:22.038Z] ['info'] Processing /home/runner/work/rpma/rpma/.github/workflows/coverage.yml...
[2023-04-21T12:31:22.041Z] ['error'] There was an error running the uploader: undefined is not a function
[2023-04-21T12:31:22.042Z] ['verbose'] The error stack is: TypeError: undefined is not a function
    at main (/snapshot/repo/dist/src/index.js)
[2023-04-21T12:31:22.042Z] ['verbose'] End of uploader: 781 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@dluki can you remove the working-directory argument?

@tom Removed: test: new COVERAGE · ldorau/rpma@85d6e42 · GitHub

The build: test: new COVERAGE · ldorau/rpma@85d6e42 · GitHub

Lines executed:70.62% of 13085
[2023-04-21T16:24:42.055Z] ['verbose'] coveragepy is not installed
[2023-04-21T16:24:42.056Z] ['info'] Searching for coverage files...
[2023-04-21T16:24:42.192Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-04-21T16:24:42.193Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-04-21T16:24:42.193Z] ['verbose'] Preparing to clean the following coverage paths: .github/workflows/coverage.yml
[2023-04-21T16:24:42.193Z] ['info'] => Found 1 possible coverage files:
  .github/workflows/coverage.yml
[2023-04-21T16:24:42.193Z] ['verbose'] End of network processing
[2023-04-21T16:24:42.193Z] ['info'] Processing /home/runner/work/rpma/rpma/.github/workflows/coverage.yml...
[2023-04-21T16:24:42.194Z] ['error'] There was an error running the uploader: undefined is not a function
[2023-04-21T16:24:42.195Z] ['verbose'] The error stack is: TypeError: undefined is not a function
    at main (/snapshot/repo/dist/src/index.js)
[2023-04-21T16:24:42.195Z] ['verbose'] End of uploader: 541 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@dluki sorry, I meant root_dir: /home/runner/work/rpma/rpma/ as well

@tom Removed too: test: new COVERAGE · ldorau/rpma@2037d00 · GitHub

The build: test: new COVERAGE · ldorau/rpma@2037d00 · GitHub

Lines executed:70.62% of 13085
[2023-04-21T16:48:32.788Z] ['verbose'] coveragepy is not installed
[2023-04-21T16:48:32.788Z] ['info'] Searching for coverage files...
[2023-04-21T16:48:32.932Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-04-21T16:48:32.932Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-04-21T16:48:32.932Z] ['verbose'] Preparing to clean the following coverage paths: .github/workflows/coverage.yml
[2023-04-21T16:48:32.933Z] ['info'] => Found 1 possible coverage files:
  .github/workflows/coverage.yml
[2023-04-21T16:48:32.933Z] ['verbose'] End of network processing
[2023-04-21T16:48:32.933Z] ['info'] Processing /home/runner/work/rpma/rpma/.github/workflows/coverage.yml...
[2023-04-21T16:48:32.934Z] ['error'] There was an error running the uploader: undefined is not a function
[2023-04-21T16:48:32.935Z] ['verbose'] The error stack is: TypeError: undefined is not a function
    at main (/snapshot/repo/dist/src/index.js)
[2023-04-21T16:48:32.935Z] ['verbose'] End of uploader: 575 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@dluki this is really strange…

I’m going to be offline until May 1st, the best thing I can recommend is that your coverage reports are not getting collected.

I wonder if 1. you are in the wrong directory, 2. the coverage reports are not being created, or 3. the coverage reports are being excluded via this list.