我在我的CI/CD设置中找不到Gitlab的测试覆盖范围解析设置

发布于 2025-02-10 01:02:47 字数 369 浏览 0 评论 0原文

我想为我的测试覆盖结果设置正则表达式。

根据 gitlab的文档,我应该能够在项目设置中的测试覆盖范围解析设置中执行设置> CI/CD>一般管道

但是,我找不到那里的设置。我可以在哪里设置GitLab中测试覆盖范围解析设置的正则表达式?

I would like to set the regular expression for my test coverage results.

According to Gitlab's documentation, I should be able to do that in the test coverage parsing setting in my project settings, by navigating to Settings > CI/CD > General pipelines.

However, I cannot find the setting there. Where can I set the regular expression for the test coverage parsing setting in Gitlab?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦忆晨望 2025-02-17 01:02:47

自GitLab 14.8以来删除了“ rel =“ noreferrer”>弃用,自Gitlab 15.0以来已被删除。因此,该设置可以在设置&gt中不再找到 ; CI/CD>一般管道

现在,您应该在gitlab ci/cd配置文件中使用coverage设置,并在设置值中使用正则表达式:

示例:

unit-test:
  stage: test
  coverage: '/coverage: \d+.\d+% of statements/'
  script:
    - go test -cover

Since Gitlab 14.8, the test coverage parsing setting has been deprecated and has been removed since Gitlab 15.0. The setting can therefore no longer be found in Settings > CI/CD > General pipelines.

You should now use the coverage setting in your Gitlab CI/CD configuration file and use your regular expression in the setting value:

Example:

unit-test:
  stage: test
  coverage: '/coverage: \d+.\d+% of statements/'
  script:
    - go test -cover
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文