我有一个 bitbucket 私人 monorepo。
目前我有两个 Laravel 服务(接下来的几个月会更多),我想与 codecov 集成以实现代码覆盖率。
在管道中,我添加了一个简单的脚本来生成覆盖范围并使用标志上传:
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage/coverage.xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -F api -f coverage/coverage.xml
这将针对“后端”标志重复。
覆盖率报告已上传,我可以看到分支、百分比等
我缺少的是:
对于 PR 评论,我在根目录中设置了一个 codecov.yml:
codecov:
bot: {{ MY_USERNAME }}
comment: # this is a top-level key
layout: " diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: false # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff]
coverage:
status:
project: off
patch: off
flag_management:
individual_flags:
- name: api
paths:
- api/
statuses:
- type: project
target: 100%
threshold: 5%
- name: backend
paths:
- backend/
statuses:
- type: project
target: auto
threshold: 5%
但似乎没有被执行,因为在我的公关中我没有评论。
对于源代码,我遵循了一些教程并阅读了社区(现已关闭),但我不知道它是什么。
当我们提供代码库源代码时,Codecov 的社区委员会已关闭,转而支持 Github Issues。
您可以在此处将其作为问题打开吗?