3

Codecov 无法处理代码覆盖率报告。它似乎上传成功,但出现错误:“处理覆盖率报告时出错”。

我的项目已经成功地与 Travis-CI 集成。我只是想将我的代码覆盖率报告发布到 Codecov。

这是一个公共项目,因此它不需要 Codecov 的令牌。

到目前为止,我在这个项目中只有一个示例测试。我试图确保这种集成在继续之前有效。

我在模式编辑器中启用了代码覆盖率,当我在 Xcode 中运行测试时,我可以看到它正在生成代码覆盖率报告。

在将报告发送到 Codecov 之前,我是否需要与 Slather 集成以格式化我的报告?

我的文件的路径可能是错误的吗?

# travis.yml

language:
  - swift
osx_image: xcode10.2
script:
  - xcodebuild -scheme Healthy -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' -enableCodeCoverage YES build test
after_success:
  - bash <(curl -s https://codecov.io/bash)
2.80s$ bash <(curl -s https://codecov.io/bash)
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-8a28df4
==> Travis CI detected.
    project root: .
--> token set from env
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Processing Xcode reports via llvm-cov
    DerivedData folder: /Users/travis/Library/Developer/Xcode/DerivedData
    hint Speed up Swift processing by using use -J 'AppName' (regexp accepted)
    hint This will remove Pods/ from your report. Also https://docs.codecov.io/docs/ignoring-paths
    + Building reports for Healthy framework
    + Building reports for HealthyTests xctest
    -> Running gcov for Obj-C
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 2 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + TRAVIS_OS_NAME
    + TRAVIS_RUBY_VERSION
==> Reading reports
    + ./HealthyTests.xctest.coverage.txt bytes=768
    + ./Healthy.framework.coverage.txt bytes=417
==> Appending adjustments
    http://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=a88333de1e49b8ba01ea8afe1106eb4ebab45daf&build=22.1&build_url=&name=&tag=&slug=dcortright%2FHealthy&service=travis&flags=&pr=false&job=215842516
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-8a28df4&token=[secure]&branch=master&commit=a88333de1e49b8ba01ea8afe1106eb4ebab45daf&build=22.1&build_url=&name=&tag=&slug=dcortright%2FHealthy&service=travis&flags=&pr=false&job=215842516
    -> Uploading
    -> View reports at https://codecov.io/github/dcortright/Healthy/commit/a88333de1e49b8ba01ea8afe1106eb4ebab45daf

我在 Codecov 页面上看到的只是“处理覆盖率报告时出错”。

4

0 回答 0