Home›Industry & Policy›新規ブランチへのコードカバレッジ送信でCIが失敗しないように
Code coverage uploads no longer fail CI for new branches

新規ブランチへのコードカバレッジ送信でCIが失敗しないようにCode coverage uploads no longer fail CI for new branches

元記事を読むRead original articlegithub.blog(新しいタブで開きます)(opens in a new tab)
AI2 点サマリSummary highlight
  • GitHub Code Qualityのupload-code-coverageは、プルリクエスト未作成の新規ブランチへのpush時に送信を省略し、理由を通知するようになった。
  • 不要な失敗でCIが止まらず、開発者はブランチ作成直後から作業を進められる。

GitHub Code Quality's upload-code-coverage action now skips uploads for pushed branches with no open pull request and reports why, preventing needless CI failures for developers.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (github.blog) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (github.blog).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

CI失敗を回避

GitHub Code Qualityのupload-code-coverage actionは、オープン中のプルリクエストが関連付けられていないブランチへのpushで、コードカバレッジの送信を省略するようになった。これにより、ワークフロー自体には問題がないにもかかわらず、カバレッジ送信の処理によってCIが失敗する事態を防げる。

従来の送信処理

従来、カバレッジAPIは、デフォルトではないブランチへのpushに対してプルリクエスト番号を必要としていた。しかし、この番号が存在するのはプルリクエストが開かれた後に限られる。そのため、新しいブランチを作成し、プルリクエストを開く前にpushすると、必要な番号を指定できず、コードカバレッジの送信ステップが失敗していた。

この失敗は、コードやワークフローに問題があることを意味するものではなかった。ブランチへのpushとプルリクエスト作成の順序によって、送信に必要な情報がまだ用意されていないことが原因だった。

送信を省略

変更後は、関連するプルリクエストがないブランチへのpushでactionが実行されると、エラーにするのではなくカバレッジの送信を省略する。省略した理由は、Actions noticeとstep summaryに表示されるため、送信処理が行われなかった理由を確認できる。

対象となるのは、まだオープン中のプルリクエストがないブランチへのpushだ。そのブランチに対する以後のpushも、プルリクエストが開かれるまでは同様に送信が省略される。これにより、開発者は新規ブランチの作成直後から、不要なCI失敗で処理を止められることなく作業を進められる。

Code coverage uploads

GitHub Code Quality’s upload-code-coverage action no longer causes CI to fail when code is pushed to a branch that does not yet have an open pull request. The change prevents an unnecessary coverage-upload failure while developers are working on a newly created branch before opening a pull request.

Pushes to new branches

Previously, the coverage API required a pull request number for every push to a non-default branch. However, a pull request number is only available after a pull request has been opened.

As a result, pushing a new branch before creating its pull request caused the coverage-upload step to fail. That failure occurred even when there was nothing wrong with the workflow itself, meaning CI could be stopped by the absence of a pull request number rather than by a workflow problem.

Skips the upload

When the action now runs following a push to a branch without an associated pull request, it skips the code coverage upload instead of failing. This allows CI to continue without treating the unavailable pull request number as an error.

The behavior applies both to the first push to a branch that does not yet have an open pull request and to subsequent pushes to that branch. Uploads continue to be skipped until a pull request is opened.

Actions notice and step summary

The skipped upload is reported rather than left unexplained. The action provides the reason in an Actions notice and in the step summary, making clear that the branch has no associated open pull request.

This distinguishes the skipped operation from an actual workflow failure. Developers can continue working from the point when a branch is created, while the action avoids attempting an upload that the coverage API cannot associate with a pull request.

ポコと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.

  1. ポコPoko新しいブランチへpushすると、コードカバレッジ送信を失敗ではなく省略するの? なんで?When I push a new branch, does it skip the code coverage upload instead of failing? Why?
  2. TECHガイドTECH Guide開いたPRがないと、送信に必要だったPR番号もありません。今は失敗させず、送信を省略して理由を通知します。Without an open pull request, there’s no PR number for the upload. The action now skips it instead of failing and reports why.
  3. ポコPokoじゃあ、PRを作る前にpushする開発者が、カバレッジ送信のせいでCIを止められずに済むんだね?So developers can push before opening a PR without having CI stopped by the coverage upload?
  4. TECHガイドTECH Guideそう。ワークフローに問題がなくても起きていた失敗を避け、ブランチ作成直後から作業を進められます。Yes. It avoids a failure that could happen even when the workflow was fine, letting developers keep working right after creating a branch.
  5. ポコPokoPRを開くまでは送信を省略して、CIは不要に失敗しない。しかも理由も分かるんだね。Got it: uploads are skipped until a PR is opened, CI avoids a needless failure, and the reason is shown.
  6. TECHガイドTECH Guide対象は、開いたPRがないブランチへのpushです。PRが開かれるまでは、その後のpushでも送信が省略されます。This applies to pushes on branches without an open PR. Later pushes keep skipping the upload until a PR is opened.
記事情報・収集記録Article details & collection record
出典Source
GitHub Changelog公式Official
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
変更履歴Changelog
原文言語Source language
EN
重要度の位置づけImportance in this lane
MediumMedium priority(Industry & Policy 456件中、同等以上 398件)(398 of 456 Industry & Policy entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.0 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
短命 (ニュース)Short-lived (news)

📰Industry & Policy の他の記事More from Industry & Policyもっと見る →View more →

ページ上部へScroll to top