From bbcdbb4151cd65c4d32ccdfae2177e7beb1b441c Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:28:14 +0100 Subject: [PATCH] Add error handling for missing benchmark report zip file in CI workflow --- .github/workflows/docs-and-testcov.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 53a3495..cef1082 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -118,9 +118,13 @@ jobs: curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -o benchmark-report.zip "$artifact_url" - mkdir -p benchmark-report - # print ls -a - echo "$( ls -a benchmark-report )" + + # check if there is a benchmark-report.zip file + if [ ! -f benchmark-report.zip ]; then + echo "benchmark-report.zip not found!" + exit 1 + fi + unzip benchmark-report.zip -d benchmark-report # there will be a tar file in the benchmark-report directory # called artifact.tar. unzip it into the benchmark-report