From 6331ce7d30a831a23078c97cfe71fefd093f0643 Mon Sep 17 00:00:00 2001 From: yashchavanweb Date: Tue, 1 Dec 2026 17:34:35 +0530 Subject: [PATCH] feat(dev): tc-automate: detect already-automated per case --- .github/workflows/tc-automate.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tc-automate.yml b/.github/workflows/tc-automate.yml index 8fd5483..93af715 100644 --- a/.github/workflows/tc-automate.yml +++ b/.github/workflows/tc-automate.yml @@ -152,13 +152,16 @@ jobs: fi echo "=== Automating $ID: $NAME ===" + # Capture this case's output on its own so the "Already automated" check only ever sees + # this case (the combined log also holds earlier cases and the grounding run). tc automate "$ID" --project "$TM_PROJECT" --app "$BS_URL" --platform android \ - --yolo --json 2>&1 | tee -a ../tc-automate.log - code=${PIPESTATUS[0]} + --yolo --json > ../tc-automate-case.log 2>&1 + code=$? + cat ../tc-automate-case.log | tee -a ../tc-automate.log if [ "$code" -eq 0 ]; then DONE="${DONE:+$DONE }$ID" COUNT=$((COUNT + 1)) - elif tail -n 40 ../tc-automate.log | grep -q "Already automated"; then + elif grep -qi "already automated" ../tc-automate-case.log; then echo "Skipping $ID (already automated)" else echo "tc automate failed for $ID (exit $code)"