codecov/codecov-bash

Error processing coverage reports in GitHub Actions

Closed this issue · 0 comments

I have a monorepo that I'm trying to upload reports from but keep getting the dreaded "There was an error processing coverage reports." error whenever I upload from GitHub actions.

This doesn't happen when I upload from my computer instead.

My guess is that there is a problem with the paths, which I'm trying to fix in codecov.yml.

If I dump using -d I get something similar to the following output:

# path=services/users/coverage.xml
<?xml version="1.0" ?>
<coverage version="5.0.3" timestamp="1583878493885" lines-valid="89" lines-covered="87" line-rate="0.9775" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
	<source>/github/workspace/services/users</source>
	<source>/github/workspace/services/users/src</source>
</sources>
<packages>
	<package name="." line-rate="0.9775" branch-rate="0" complexity="0">
		<classes>
			<class name="__init__.py" filename="__init__.py" complexity="0" line-rate="1" branch-rate="0">
				<methods/>
				<lines/>
			</class>
			<class name="mutations.py" filename="mutations.py" complexity="0" line-rate="0.9811" branch-rate="0">
				<methods/>
				<lines>

My question is how should I fix this path issue? Is the path on each <class> supposed to be relative to where the coverage.xml file is, relative to the git repo root or relative to the github workspace directory?

Since these files are all in the services/users/src directory I thought that if I did the following fix:

fixes:
  - "::src"

It would work, but it doesn't. I also tried: ::services/users/src, ::services/users and all other possible variations. What am I getting wrong here?

Thanks for the help!