如何获取 codecov.io 将覆盖率报告发布到 bitbucket 拉取请求注释



我正在尝试将 codecov.io 与BitRise和BitBucket一起使用。我能够从发布到 CodeCov.io 的拉取请求中获取代码覆盖率报告,但不能从 bitbucket 拉取请求注释中获取代码覆盖率报告。

我在存储库中添加了一个 codecov.yaml 文件,如下所示:

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false  # if true: only post the comment if coverage changes
require_base: no        # [yes :: must have a base report to post]
require_head: no       # [yes :: must have a head report to post]
branches: null

我还设置了一个对存储库具有写入权限的新 bitbucket 用户,我也使用该用户登录了 codecov.io,并且我通过编辑 Team.yaml 文件将此用户设置为"codecov bot",如下所示:

codecov:
bot: codecovbot

我还需要做些什么来使其正常工作吗?

您可以在 codecov.io 帐户中添加 yml 设置:

codecov:
bot: codecovbot
coverage:
status:
project:
default: off
patch:
default: off
comment:
layout: "diff, flags, files"
behavior: default
require_changes: false  # if true: only post the comment if coverage changes
require_base: no        # [yes :: must have a base report to post]
require_head: yes       # [yes :: must have a head report to post]
branches: null

最新更新