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)"