我正在尝试让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在build/reports/jacoco/codeCoverageReport
中创建的,并且xml报告实际上已经存在。
我按照指南here (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
bash <(curl -s https://codecov.io/bash) -f build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml