0

我正在尝试将 travis-ci 与 Codacy 一起使用,但 travis 向我返回以下错误:

Please visit http://docs.codecov.io/docs/supported-languages
after_success.2
1.11s$ java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r build/reports/jacoco/test/jacocoTestReport.xml
10/29 00:35:23 INFO  c.c.rules.ConfigurationRules:101 - Using API base URL: https://api.codacy.com 
10/29 00:35:23 ERROR c.c.CodacyCoverageReporter$:28 - File /home/travis/build/rjdesenvolvimento/apipessoas/build/reports/jacoco/test/jacocoTestReport.xml does not exist. 
Done. Your build exited with 0.

我的 .travis.yml

dist: trusty
addons:
  sonarcloud:
    organization: "rjdesenvolvimento-github"
    token:
      secure: <token>
script:
- mvn sonar:sonar -Dsonar.projectKey=rjdesenvolvimento_apipessoas -Dsonar.organization=rjdesenvolvimento-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=51
after_success:
- bash <(curl -s https://codecov.io/bash)
- java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r build/reports/jacoco/test/jacocoTestReport.xml

任何人都可以帮助我吗?

4

1 回答 1

1

您是否通过网站尝试过 Codacy 支持?似乎 /home/travis/build/rjdesenvolvimento/apipessoas/build/reports/jacoco/test/jacocoTestReport.xml 不存在,您如何生成覆盖范围?

Codacy 插件只会上传覆盖信息,您仍然需要生成它。

无论如何,请联系 Codacy 支持,他们会为您提供帮助。

于 2018-10-29T19:53:23.243 回答