From 4474adcc03f6a1ad343268afc72be22d35c1ae8e Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 23 Jun 2023 14:25:10 -0400 Subject: [PATCH] .github: set pipefail for benchmarks This avoids tee overriding the exit code when a benchmark fails. --- .github/workflows/build-test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index afc70478ef..a95210fcbe 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -253,7 +253,9 @@ jobs: with: go-version: "${{ env.GO_VERSION }}" - name: "Benchmark" - run: "go run mage.go test:bench | tee benchmarks.txt" + run: | + set -o pipefail # Don't let tee replace the exit-code + go run mage.go test:bench | tee benchmarks.txt - name: "Download previous benchmark data" uses: "actions/cache@v1" with: