From 982ae6ff08b832de0b39e3fdc9781a468ae3d19c Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 30 Oct 2023 19:48:38 -0500 Subject: [PATCH] Ensure that ecosystem check job fails if the tooling encounters an unexpected error (#8365) Previously, `| tee` would hide bad exit codes from `ruff-ecosystem ...` See poc failure at https://github.com/astral-sh/ruff/actions/runs/6698487019/job/18200852648?pr=8365 --- .github/workflows/ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e7e63b462e15..1e92fbbae2b34 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -215,6 +215,9 @@ jobs: # Make executable, since artifact download doesn't preserve this chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff + # Set pipefail to avoid hiding errors with tee + set -eo pipefail + ruff-ecosystem check ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-check cat ecosystem-result-check > $GITHUB_STEP_SUMMARY @@ -227,6 +230,9 @@ jobs: # Make executable, since artifact download doesn't preserve this chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff + # Set pipefail to avoid hiding errors with tee + set -eo pipefail + ruff-ecosystem format ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-format cat ecosystem-result-format > $GITHUB_STEP_SUMMARY