Skip to content

[BUG] 2 files with same name, but only 1 is uploaded #1808

@moi15moi

Description

@moi15moi

Describe the bug
It's seems that when 2 files have the same name, but are not in the same directory, the codecov-action upload the wrong file.

To Reproduce
I'm not sure how we can reproduce this.
Currently, I'm able to reproduce my problem with this PR: https://github.com/moi15moi/comtypes/pull/4/files

Expected behavior
The file setup.py shouldn't be uploaded to codecov, but the file comtypes\test\setup.py should be.

The file setup.py shouldn't be uploaded to codecov because, in my pyproject.toml, I wrote:

[tool.coverage.run]
source = ["comtypes"]

Also, the coverage.xml file only contains mention of test/setup.py (which correspond to comtypes\test\setup.py), so I'm not sure why it upload setup.py:

<class name="setup.py" filename="test/setup.py" complexity="0" line-rate="0" branch-rate="0">
	<methods/>
	<lines>
		<line number="2" hits="0"/>
		<line number="3" hits="0"/>
		<line number="5" hits="0"/>
		<line number="7" hits="0"/>
	</lines>
</class>

Finally, it use the result of comtypes\test\setup.py for setup.py has you can see in this screenshot:
Image

Regression
I don't know.

Versions

  • OS: windows
  • Git Host: GitHub
  • CI/CD: GitHub Actions
  • Uploader: codecov-action@v5.4.0

Commit and CI link

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions