Skip to main content

Code coverage uploads no longer fail CI for new branches

By Steven Van ·

GitHub Code Quality's coverage action now skips pushes without an open pull request, on Team and Enterprise Cloud plans.

Coverage uploads from the Code Quality upload-code-coverage action no longer fail CI when a branch has no open pull request. Previously the coverage API required a pull request number for any push to a non-default branch, so pushing a new branch before opening a pull request failed the upload step even when the workflow was fine.

The action now skips the upload on those pushes and explains why in an Actions notice and step summary. This applies to the first push and any later pushes until a pull request is opened. Uploads for the default branch and for supported pull request events work as before, so existing workflows need no changes. The change is described in GitHub's changelog and setup docs.

One thing to watch: if a workflow uploads coverage only on push events, opening a pull request will not trigger an upload by itself. Coverage resumes on the next push to that branch. To upload as soon as a pull request opens, add a pull_request trigger to the workflow.

The change is available now on GitHub Enterprise Cloud and GitHub Team, including Enterprise Cloud with data residency. It is not available on GitHub Enterprise Server.

GitHub
GitHub
Where the world builds software — Git hosting, pull requests, issues, Actions CI/CD, and Copilot, free for public and private repos.
View GitHub →

Original source

Read Code coverage uploads no longer fail CI for new branches on Creators Toolbox