Codecov:错误处理覆盖率报告
Codecov: error processing coverage reports
我想将 codecov 添加到 this project. Yet, codecov says here,它无法处理我使用此命令创建的 coverage.xml 文件:pytest python/tests -v --junitxml=coverage.xml
在 Travis CI 脚本中。
在那之前的一切,比如提供我的令牌,似乎都按照 TravisCI build here.
中的建议工作
我认为这可能是路径问题,但我在 codecov.yml
中包含了一个潜在的修复程序,但没有任何改变。
因此,我认为脚本 codecov.yml
、travis.yml
和 utils/travis_runner.py
不是问题的一部分。
--junitxml
选项用于生成 JUnit 格式的报告。使用选项 --cov-report
生成覆盖率报告。 pytest-cov
允许多次传递 --cov-report
以生成不同格式的报告。示例:
$ pip install pytest pytest-cov
$ pytest --cov=mypkg --cov-report term --cov-report xml:coverage.xml
将打印覆盖率 table 并生成与 CodeCov 兼容的 Cobertura XML 报告。
我想将 codecov 添加到 this project. Yet, codecov says here,它无法处理我使用此命令创建的 coverage.xml 文件:pytest python/tests -v --junitxml=coverage.xml
在 Travis CI 脚本中。
在那之前的一切,比如提供我的令牌,似乎都按照 TravisCI build here.
中的建议工作我认为这可能是路径问题,但我在 codecov.yml
中包含了一个潜在的修复程序,但没有任何改变。
因此,我认为脚本 codecov.yml
、travis.yml
和 utils/travis_runner.py
不是问题的一部分。
--junitxml
选项用于生成 JUnit 格式的报告。使用选项 --cov-report
生成覆盖率报告。 pytest-cov
允许多次传递 --cov-report
以生成不同格式的报告。示例:
$ pip install pytest pytest-cov
$ pytest --cov=mypkg --cov-report term --cov-report xml:coverage.xml
将打印覆盖率 table 并生成与 CodeCov 兼容的 Cobertura XML 报告。