When I upload my coverage report to codecov, it show a smaller coverage compared to my local result. Codecov also does not show all files that have been tested.
This are my commands:
coverage run -m pytest -m "not e2e"
coverage xml
./codecov -t <my token> # upload to codecov -> shown coverage is ca. 50%
# check local results
coverage report # shows over 80%
Codecov works with existing coverage reports. If you have a concern about a specific file, you can check the underlying data, by going to the commit page in Codecov UI, then "builds" tab. From there you can download the raw coverage report that Codecov received. Check for the filename there, and see if it's found and if it matches the path and if it has any coverage data.
More troubleshooting steps here: https://docs.codecov.com/docs/unexpected-coverage-changes
Please watch the video at the bottom, it should help you with debugging.