uploader: [CODE-874] New uploader is unable to find and upload coverage reports from Xcode
Describe the bug The new uploader fails to find coverage reports from Xcode.
To Reproduce
git clone https://github.com/chris-araman/CombineCloudKit.git
cd CombineCloudKit
swift package generate-xcodeproj
xcodebuild test -enableCodeCoverage YES -scheme CombineCloudKit-Package
bin/codecov -n -Q github-action-2.0.1 -Z
Expected behavior The coverage report is found and uploaded successfully.
Additional context
codecov-action@v2
uses the new uploader. codecov-action@v1
used the old bash uploader. The new uploader fails to find coverage reports from Xcode when the bash uploader found them successfully. I encountered this issue when attempting to migrate from codecov-action@v1
to @v2
.
It seems this functionality was implemented in the bash uploader here: https://github.com/codecov/codecov-bash/blob/ae76691c8554334bc1ddc355f6667fd36d6890f5/codecov#L1148
There are notes in https://github.com/codecov/uploader/issues/15 about wanting to keep this project a “pure uploader”. I think separating the concerns of the uploader from the concerns of something processing reports is admirable. However, I think this sort of boilerplate logic is useful to users of the uploader. Perhaps it can be ported to a more coverage-friendly environment (Node.js, Typescript) alongside the uploader functionality, even if it’s in a separate module?
This issue is preventing me from migrating to the new uploader via codecov-action@v2
.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 24 (9 by maintainers)
Commits related to this issue
- Issue is possibly with codecov@v2 action, fallback to codecov. See https://github.com/abhinavsingh/proxy.py/runs/4110423084\?check_suite_focus\=true and https://github.com/codecov/uploader/issues/223 — committed to abhinavsingh/proxy.py by abhinavsingh 3 years ago
- Update outdated sections of the codebase (#670) * Remove autopep8, is redundant now after recent CI changes * Add pyenv .python-version to .gitignore * Update year * Add lib-pytest target so... — committed to abhinavsingh/proxy.py by abhinavsingh 3 years ago
- v2.4.0rc1 (#777) * Add proxy auth test coverage (#496) * Cover all proxy auth scenarios * Add test_proxy_auth_works_with_mixed_case_basic_string * Update tox from 3.21.3 to 3.21.4 (#497) ... — committed to abhinavsingh/proxy.py by abhinavsingh 3 years ago
😏 I was doing something wrong. This got me on the right track:
This generates
coverage-report-.json
, which seems to show valid file names and line numbers.Is there an update on this? I see a more recent related issue https://github.com/codecov/uploader/issues/803 where there’s a “Running Xcode conversion…” step in the output log of the uploader. When using the latest CircleCI orb I don’t see that step, instead seeing the error “There was an error running the uploader: No coverage files located, please try use
-f
, or change the project root with-R
”.It would help some, but certainly not enough developers. We’re not using fastlane for example and we have a ton of swift packages that are now failing to produce coverage reports.
To mitigate the issue temporarily, I’ve written an swift-coverage-action that performs the tasks previously done by the bash uploader. There are certain features missing (e.g. the
-J
parameter), but it should do the trick most of the time.An example of how to use it can be found here.
I still hope to retire that action in the near future, though. 😉
Any update on this? All my coverage reports say 0%