fix(ci): prevent bash -e from killing release gate on skipped desktop tests#259
Conversation
GitHub Actions uses `bash -e`, so when `run_executed_tests` returns 1 (tests skipped), the script exits before reaching `rc=$?`. Use `&& rc=0 || rc=$?` pattern to capture the return code without triggering set -e. This was causing the release gate to fail even though desktop E2E tests passed on main — the HEAD run had skipped desktop jobs (no desktop changes detected by the e2e-desktop workflow), and the fallback search for an in-range run never executed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: a1c6de460be5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughModified exit code handling in the release gate workflow by chaining the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes the release gate workflow so that “desktop E2E tests were skipped” (exit code 1 from run_executed_tests) doesn’t prematurely terminate the step under GitHub Actions’ default bash -e, allowing the fallback search for an in-range run with executed tests to proceed.
Changes:
- Captures
run_executed_testsexit codes without triggeringset -eearly-exit by usingcmd && rc=0 || rc=$?. - Applies the same exit-code capture fix both for the HEAD run check and the in-range run fallback loop.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
==========================================
+ Coverage 46.31% 46.68% +0.37%
==========================================
Files 106 106
Lines 8266 8255 -11
Branches 591 594 +3
==========================================
+ Hits 3828 3854 +26
+ Misses 4271 4233 -38
- Partials 167 168 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
mainbash -e, so whenrun_executed_testsreturns 1 (tests were skipped), the script exits beforerc=$?can capture the return code&& rc=0 || rc=$?pattern to capture the return code without triggeringset -eTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit