Fix CI: stop workflow when build fails, skip artifact upload#1620
Merged
Conversation
Remove `continue-on-error: true` and `if: always()` guards from post-build steps (coverage upload, prepare artifact, upload artifact) in linux-build, macos-build, and windows-build jobs. Also remove the now-redundant "Fail if rust tests failed" step. When rust-tests fails, the job now stops naturally without attempting to package or upload artifacts.
Copilot
AI
changed the title
[WIP] Fix code according to review comment on coverage upload
Fix CI: stop workflow when build fails, skip artifact upload
Jul 10, 2026
Code Coverage ReportNo Rust files were changed in this PR. 🔵 Full Codebase Coverage81% (good)
|
SteveL-MSFT
approved these changes
Jul 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust GitHub Actions workflow to correctly short-circuit jobs when the build/test step fails, preventing downstream steps from attempting to package or upload artifacts that were never produced.
Changes:
- Removed
continue-on-error: truefrom therust-testssteps so failures stop the job normally. - Removed
if: always()from artifact/coverage upload and packaging steps so they only run on successful builds. - Removed the explicit “Fail if rust tests failed” workaround step, since it’s no longer needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
rust-testsfailed, the workflow continued to package and upload artifacts (coverage,bin.tar) that were never produced, causing misleading CI failures downstream.Changes
continue-on-error: truefrom therust-testsstep inlinux-build,macos-build, andwindows-buildjobs — default is alreadyfalseif: always()from post-build steps (upload coverage, prepare artifact, upload artifact) in all three jobs — these now only run on successcontinue-on-errorpattern; failures now naturally short-circuit the jobBefore:
After: