From cd205e2e797e9a533f8c0308be43a17924d520f4 Mon Sep 17 00:00:00 2001 From: Hlamalani Date: Thu, 17 Oct 2024 11:25:52 +0200 Subject: [PATCH] add test coverage to PR comment --- .github/workflows/test.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 33c07ed4..dd287a9f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -60,7 +60,11 @@ jobs: run: | git fetch origin develop git diff origin/develop --unified=0 > diff.txt - grep '^@@' diff.txt | awk '{print $2}' > changed_lines.txt + awk '/^@@/ {print $0}' diff.txt | while IFS= read -r line; do + # Extract the file name and line numbers + line_number=$(echo "$line" | grep -oP '\d+(?=\s)' | xargs) + echo "Changed lines: $line_number" + done > changed_lines.txt cat changed_lines.txt - name: Check for untested lines