From d68d7ee31d2065a4e211ae6c311f15246bd57215 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 9 Apr 2026 09:54:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(CI)=20add=20last-failed=20flag=20o?= =?UTF-8?q?nly=20if=20last-run=20is=20filled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We got cases where the last-run is empty, but the last-failed flag is set to true. If that happens, the workflow will fail because the last-run is empty. We now check if the last-run is filled before setting the last-failed flag. --- .github/workflows/impress-frontend.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/impress-frontend.yml b/.github/workflows/impress-frontend.yml index 5c015563..f8a32857 100644 --- a/.github/workflows/impress-frontend.yml +++ b/.github/workflows/impress-frontend.yml @@ -164,7 +164,13 @@ jobs: LAST_FAILED_FLAG="" if [ "${{ github.run_attempt }}" != "1" ]; then - LAST_FAILED_FLAG="--last-failed" + LAST_RUN_FILE="apps/e2e/test-results/.last-run.json" + if [ -f "$LAST_RUN_FILE" ]; then + FAILED_COUNT=$(jq '.failedTests | length' "$LAST_RUN_FILE" 2>/dev/null || echo "0") + if [ "${FAILED_COUNT:-0}" -gt "0" ]; then + LAST_FAILED_FLAG="--last-failed" + fi + fi fi yarn e2e:test --project='chromium' $LAST_FAILED_FLAG @@ -246,7 +252,13 @@ jobs: LAST_FAILED_FLAG="" if [ "${{ github.run_attempt }}" != "1" ]; then - LAST_FAILED_FLAG="--last-failed" + LAST_RUN_FILE="apps/e2e/test-results/.last-run.json" + if [ -f "$LAST_RUN_FILE" ]; then + FAILED_COUNT=$(jq '.failedTests | length' "$LAST_RUN_FILE" 2>/dev/null || echo "0") + if [ "${FAILED_COUNT:-0}" -gt "0" ]; then + LAST_FAILED_FLAG="--last-failed" + fi + fi fi yarn e2e:test --project=firefox --project=webkit $LAST_FAILED_FLAG