Skip to content

Commit 11ef643

Browse files
committed
Fixed test count issue
1 parent 0c85969 commit 11ef643

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/test-and-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
OUTPUT=$(./Lab1 2>&1)
2525
echo "$OUTPUT"
2626
# Parse Unity output: "X Tests Y Failures Z Ignored"
27-
TESTS=$(echo "$OUTPUT" | grep -oP '(?<=\-\-\-\-\-\s)\d+(?=\sTests)' || echo "0")
28-
FAILURES=$(echo "$OUTPUT" | grep -oP '\d+(?= Failures)' || echo "0")
27+
TESTS=$(echo "$OUTPUT" | grep -oP '\d+(?=\s+Tests)' | head -1 || echo "0")
28+
FAILURES=$(echo "$OUTPUT" | grep -oP '\d+(?=\s+Failures)' | head -1 || echo "0")
2929
PASSED=$((TESTS - FAILURES))
3030
echo "tests=$TESTS" >> $GITHUB_OUTPUT
3131
echo "passed=$PASSED" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)