Lotu Radar About

Code coverage uploads no longer fail CI for new branches

GitHub Changelog Developers & Open Source Score 8/10

Summary

Code coverage uploads from the GitHub Code Quality upload-code-coverage action no longer fail CI when you push a branch that doesn’t yet have an open pull request. Previously, the coverage… The post Code coverage uploads no longer fail CI for new branches appeared first on The GitHub Blog .

Original Text

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> Code coverage uploads from the GitHub Code Quality upload-code-coverage action no longer fail CI when you push a branch that doesn’t yet have an open pull request.

Previously, the coverage API required a pull request number for any push to a non-default branch. Since that number only exists once a pull request is open, pushing a new branch before opening a pull request caused the coverage-upload step to fail, even though nothing was actually wrong with your workflow.

Now, when the action runs on a push to a branch without an associated pull request, it skips the upload instead of failing, and explains why in an Actions notice and step summary. This applies to:

Pushes to branches that don’t yet have an open pull request.

Subsequent pushes to those branches, until a pull request is opened.

Uploads for pushes to your default branch, and for supported pull request events, continue to work exactly as before, so you don’t need to change any existing workflow configuration.

If your workflow uploads coverage only on push events, opening a pull request won’t trigger a new upload by itself—coverage resumes on the next push to that branch. If you want coverage to upload as soon as a pull request opens, add a pull_request trigger to your workflow.

This change is available now on GitHub Enterprise Cloud and GitHub Team, including GitHub Enterprise Cloud with data residency. It isn’t available on GitHub Enterprise Server. Learn more about setting up code coverage for your repository.

The post Code coverage uploads no longer fail CI for new branches appeared first on The GitHub Blog.

Developer ToolsGitHubSoftware

Lotu Radar provides attributed news summaries and links to the original publisher. Full reporting and copyright remain with the source.