我正在尝试让 codecov 运行并处理 Jacoco 为我的 multibuild Java Gradle 项目生成的报告。但是,当我运行 codecov 脚本 ( bash <(curl -s https://codecov.io/bash)
) 时,我得到以下输出:
x> No CI provider detected.
Testing inside Docker? http://docs.codecov.io/docs/testing-with-docker
Testing with Tox? https://docs.codecov.io/docs/python#section-testing-with-tox
project root: .
Yaml found at: .codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
我已经验证报告是由 jacoco in 创建的build/reports/jacoco/codeCoverageReport
,并且 xml 报告确实存在。
我按照此处的指南(Github)设置了 jacoco 报告。我的 gradle 代码和那个 github 上的代码之间的主要区别是我已经xml.destination "${buildDir}/reports/jacoco/report.xml"
排除了,因为包含它的 Gradle 将无法处理。
.codecov.yml
codecov:
require_ci_to_pass: true
coverage:
precision: 3
round: up
range: "70...100"
status:
project: true
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: yes
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: false