Newshot

代码覆盖率上传现在会标记无效的报告格式

AI summary

GitHub Code Quality 的 upload-code-coverage action 现在会检查覆盖率报告是否为 Cobertura XML 格式;如果格式不受支持,上传步骤会失败并在 Actions 日志中显示错误,而此前这类上传看似成功,但拉取请求上不会显示任何覆盖率。若工作流因此报错,可将测试框架配置为输出 Cobertura XML,或在上传前转换报告。此外,对有效的 Cobertura 报告,处理也更宽容:不再因轻微结构问题拒绝整份报告,会跳过缺少可用行号或命中次数的行,而不是丢弃整份报告。

Translation(model translation, not the source's own text)

GitHub Code Quality 的 upload-code-coverage action 现在会检查你的覆盖率报告是否为 Cobertura XML 格式。如果格式不受支持,上传步骤就会失败,Actions 日志中会显示以下错误:

This file is not a Cobertura XML report. Upload a Cobertura XML report.

此前,这些上传看起来会成功,但你的拉取请求上不会显示任何覆盖率数据。现在,你会在工作流运行中发现该问题,并得到明确的下一步操作指引。

如果你的工作流开始因此错误而失败,请将测试框架配置为输出 Cobertura XML,或在eder上传步骤之前将报告转换为 Cobertura XML。

我们还让有效 Cobertura 报告的处理更加宽容。我们不再因为轻微的结构问题而拒绝报告,并且会跳过那些没有可用行号或命中次数的单行,而不是丢弃整份报告。

要使用代码覆盖率功能,你需要为仓库启用 GitHub Code Quality。此变更现已在 GitHub Enterprise Cloud 和 GitHub Team 上可用,包括具有数据驻留功能的 GitHub Enterprise Cloud。该功能在 GitHub Enterprise Server 上不可用。了解如何在 GitHub Enterprise Cloud 上为你的仓库设置代码覆盖率。

Only about 729 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.

Published by GitHub Changelog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗