From bba415b2b8fc7d09cf6c81dd6b95b7cb0eeac038 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 20 Feb 2026 01:06:53 +0100 Subject: [PATCH] ci: Make filter script less error-prone (#49670) The failure in #49661 was caused by a broken pipe, which then led to tests not being ran. Co-authored-by: Marshall Bowers Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [ ] Done a self-review taking into account security and performance aspects - [ ] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - N/A Co-authored-by: Marshall Bowers --- .github/workflows/extension_tests.yml | 1 + .github/workflows/run_tests.yml | 1 + tooling/xtask/src/tasks/workflows/run_tests.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.yml index 28eb08cdab..f1f414c1d9 100644 --- a/.github/workflows/extension_tests.yml +++ b/.github/workflows/extension_tests.yml @@ -23,6 +23,7 @@ jobs: - id: filter name: filter run: | + set -euo pipefail if [ -z "$GITHUB_BASE_REF" ]; then echo "Not in a PR context (i.e., push to main/stable/preview)" COMPARE_REV="$(git rev-parse HEAD~1)" diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 72693eb893..3e464c1b54 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -26,6 +26,7 @@ jobs: - id: filter name: filter run: | + set -euo pipefail if [ -z "$GITHUB_BASE_REF" ]; then echo "Not in a PR context (i.e., push to main/stable/preview)" COMPARE_REV="$(git rev-parse HEAD~1)" diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs index f141c92e1f..c234f46f3d 100644 --- a/tooling/xtask/src/tasks/workflows/run_tests.rs +++ b/tooling/xtask/src/tasks/workflows/run_tests.rs @@ -105,6 +105,7 @@ fn orchestrate_impl(rules: &[&PathCondition], include_package_filter: bool) -> N let mut script = String::new(); script.push_str(indoc::indoc! {r#" + set -euo pipefail if [ -z "$GITHUB_BASE_REF" ]; then echo "Not in a PR context (i.e., push to main/stable/preview)" COMPARE_REV="$(git rev-parse HEAD~1)"