
コードカバレッジのアップロードで無効なレポート形式を検出するようにCode coverage uploads now flag invalid report formats
GitHub Code Quality の upload-code-coverage アクションが Cobertura XML 形式かどうかを検証し、非対応形式ならステップを失敗させます。以前は成功に見えてもPRに反映されなかったため、原因に早く気づけます。
GitHub Code Quality's upload-code-coverage action now verifies that reports are Cobertura XML and fails the step otherwise. Teams no longer get silent uploads with missing PR coverage, and can fix the format quickly.
AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (github.blog) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (github.blog).
GitHub Code Quality の upload-code-coverage アクションが、アップロードされるカバレッジレポートが Cobertura XML 形式かどうかを検証するようになった。非対応の形式であればアップロードのステップが失敗し、問題をワークフロー実行の段階で把握できる。
無効な形式で失敗する
検証の結果、Cobertura XML ではないと判断されたファイルは、アップロードのステップが失敗する。Actions のログには次のエラーが表示される。
This file is not a Cobertura XML report. Upload a Cobertura XML report.
従来は、こうしたアップロードも成功したように見えていた。ところが実際にはカバレッジがプルリクエストに表示されず、原因が分かりにくい状態だった。今回の変更で、ワークフロー実行の中で問題に気づけるようになり、次に取るべき対応も明確になったと説明されている。
エラーが出たときの対処
このエラーでワークフローが失敗し始めた場合の対処は二つ示されている。一つは、テストフレームワークが Cobertura XML を出力するよう設定すること。もう一つは、アップロードのステップより前に、レポートを Cobertura XML へ変換することである。
有効なレポートへの処理は寛容に
形式の検証が厳しくなる一方で、有効な Cobertura レポートの処理は従来より寛容になった。細かな構造上の問題があっても、それだけでレポートが拒否されることはなくなった。
また、使える行番号やヒット数を持たない個別の行があった場合は、レポート全体を破棄せず、その行だけをスキップする。一部のデータに不備があっても、残りの行のカバレッジ情報は処理される仕組みだ。
影響のまとめ
今回の変更で、形式が誤っているレポートは明示的なエラーとして表れ、静かに失敗してプルリクエストにカバレッジが出ない事態を避けられる。一方、形式が正しく、軽微な不備がある程度のレポートは、これまでより受け入れられやすくなる。
自分のワークフローでこのエラーが出た場合は、出力形式の設定か変換ステップの追加を確認することになる。
Cobertura XML format check
The GitHub Code Quality upload-code-coverage action now verifies that a coverage report is in Cobertura XML format. This matters because, according to the announcement, bad uploads used to look successful while no coverage appeared on pull requests, leaving teams without a clue about what went wrong.
If the report is not in a supported format, the upload step fails. The Actions log then shows this error: "This file is not a Cobertura XML report. Upload a Cobertura XML report."
Failing instead of silent success
Previously, uploads of unsupported reports appeared to succeed, yet no coverage showed up on pull requests. The change moves the signal earlier. According to the source, the problem is now visible in the workflow run itself, with a clear next step, rather than surfacing only as missing coverage on a pull request.
For workflows that begin failing with this error, the source gives two remedies. One is to configure the test framework to output Cobertura XML. The other is to convert the existing report to Cobertura XML before the upload step runs.
More forgiving processing
The announcement also describes changes to how valid Cobertura reports are handled. Reports are no longer rejected because of minor structural issues. In addition, when individual lines lack a usable line number or hit count, those lines are skipped instead of the whole report being discarded.
Taken together, the two changes work in opposite directions on strictness. Reports in the wrong format now fail loudly at upload, while valid Cobertura reports with small flaws are more likely to be processed, with only the unusable lines left out.
What teams may notice
The practical effect is on workflow runs. A workflow that previously passed with a mismatched report format may now fail at the upload step with the error above. Teams that see it can fix the report format using one of the two approaches described, and the upload step should then proceed. Teams whose reports are already valid Cobertura XML should find processing tolerant of minor structural problems and of individual lines that cannot be read.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPokoアップロードが成功に見えるのに、PRにカバレッジが出ないことがあったの? 今回はそこがどう変わるのかな?Uploads looked successful, but no coverage showed up on PRs? What changes now?
- TECHガイドTECH Guideこの記事では、レポートがCobertura XML形式かを確認するようになったとあります。違えばステップが失敗し、ログにエラーが出ます。The post says the action now checks for Cobertura XML. If it's not, the step fails and the Actions log shows an error.
- ポコPokoじゃあ、失敗してもすぐ原因に気づけるから、直す人は助かるってこと?So people can spot the cause right away and fix it. Is that who this helps?
- TECHガイドTECH Guideそうだね。以前は気づきにくかった問題が、ワークフローの実行時に分かります。テストの出力設定を変えるか、アップロード前に変換すればいいと書かれています。Yes. A problem that was easy to miss now shows up in the workflow run. The post suggests changing your test output or converting before upload.
- ポコPokoCobertura XMLじゃないと失敗するようになって、有効なレポートは少し寛容になったんだね。So non-Cobertura reports now fail, but valid Cobertura ones are handled more forgivingly. Right?
- TECHガイドTECH Guideうん。軽微な構造の問題では拒否せず、行番号や回数が使えない行だけ飛ばすそうだよ。ただ、形式が違うと失敗する点は確認しておこう。Right. Minor structural issues won't reject a report, and unusable lines get skipped. Still, a wrong format will fail, so check that.
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy



