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

Upload script confused if Python coverage data is not in $git_root

Open jkloetzke opened this issue 3 years ago • 0 comments

I encountered a problem that the upload always failed for me with no real error message. The trigger turned out to be uncombined coverage data in some sub-directory of a Python project. The current upload script will cd to the last found directory holding a .coverage* file, call coverage combine -a and then try to cd back. But because $proj_root is a relative directory this will fail. Somewhere later in the script git ls-files is called but then in the wrong directory leading to the subsequent failure. See here for an example: https://github.com/BobBuildTool/bob/runs/2852901363#step:8:224

I think the script should better use pushd and popd. That should be safe.

BTW, while reading the script I saw that it cannot handle coverage data in multiple directories. Is this intentional?

jkloetzke avatar Jun 18 '21 14:06 jkloetzke