coveralls-public icon indicating copy to clipboard operation
coveralls-public copied to clipboard

Coveralls reporting 0% code coverage with swift codebase?

Open jackjpark opened this issue 5 years ago • 6 comments

I am running xcov and outputting the report to coveralls, travic ci generates the reports fine (I can see my coverage report in the CI console), yet coveralls reports 0% on every build.

I have run coverage on my default branch and several PR'd and there is a discrepancy between xcov output and coveralls stats

Any ideas here? i get a successfully sent message so am unsure how to proceed with debugging this issue

jackjpark avatar Aug 05 '19 08:08 jackjpark

I've been experiencing this problem too.

My coveralls page shows 0% coverage for a Swift project that is generating coverage using xcov and running CI on travis.

https://coveralls.io/github/rakutentech/ios-remote-config https://coveralls.io/builds/25516715 https://travis-ci.com/rakutentech/ios-remote-config/builds/125836479#L2025 (shows real 90% coverage)

donnie-jp avatar Sep 04 '19 05:09 donnie-jp

I plan to try https://github.com/nakiostudio/danger-xcov to skip coverage backends entirely and report directly on the PR.

donnie-jp avatar Sep 04 '19 05:09 donnie-jp

@donnie-jp i tried that but the danger integration is different and doesnt send to coveralls, its just for code review it seems

jackjpark avatar Sep 04 '19 08:09 jackjpark

Swift compilations via Xcode and Swift Package Manager use a new coverage format. Many of the existing Codecov tools deal with gcc. I was able to use xcrun llvm-cov export -format=lcov with the coveralls-lcov gem. I have working SPM example on csv-dialect-swift

The documentation on Swift language support needs to be updated since it currently references a deprecated tool that has been superseded by built-in tooling.

chrispomeroyhale avatar Jun 26 '20 08:06 chrispomeroyhale

Swift compilations via Xcode and Swift Package Manager use a new coverage format. Many of the existing Codecov tools deal with gcc. I was able to use xcrun llvm-cov export -format=lcov with the coveralls-lcov gem. I have working SPM example on csv-dialect-swift

The documentation on Swift language support needs to be updated since it currently references a deprecated tool that has been superseded by built-in tooling.

Thank u very much. It works!

I am using some 3rd libs, Do you know how to ignore SPM. I ignore the folders but looks like doesn't work

My coverage still decreased because the SPM is included.

iRILLLL avatar May 19 '21 12:05 iRILLLL

Thank u very much. It works!

I am using some 3rd libs, Do you know how to ignore SPM. I ignore the folders but looks like doesn't work

My coverage still decreased because the SPM is included.

@iRILLLL I have a vague recollection of that. llvm-cov has an -ignore-filename-regex option (llvm-cov export command documentation). It looks like I have an example of this in datapackage-swift, which has an SPM dependency, where I integrated coveralls with travisci

chrispomeroyhale avatar May 19 '21 20:05 chrispomeroyhale

This issue has been automatically marked for closure because it has not had recent activity. It will be closed if no further activity occurs. If your issue is still active please add a comment and we’ll review as soon as we can. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 20:09 stale[bot]