codecov-action
codecov-action copied to clipboard
[BUG] 2 files with same name, but only 1 is uploaded
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:
Regression I don't know.
Versions
- OS: windows
- Git Host: GitHub
- CI/CD: GitHub Actions
- Uploader: [email protected]
Commit and CI link
- CI: https://github.com/moi15moi/comtypes/actions/runs/14424131293/job/40450349313?pr=4
- codecov: https://app.codecov.io/github/moi15moi/comtypes/tree/Add-coverage-v2
Actually, there may be a link with this issue: https://github.com/codecov/codecov-action/issues/1326
Both issue have problem with their pyproject.toml.
I guess codecov may not consider what is writting in the pyproject.toml?
@moi15moi, that would be true, we don't take pyproject.toml into account.
Does all of your coverage fall under the comtype folders? If so, you can try using the network-filter argument, something like network-filter: "comtype"
Else, perhaps try setting disable-network: true
I forgot to reply.
network_filter: comtype did fix my issue.