From 68fde98ba81983eaabbd97375b030360014c48bf Mon Sep 17 00:00:00 2001 From: Dominic Evans Date: Fri, 27 Dec 2024 16:08:59 +0100 Subject: [PATCH] feat(test): add per-func code coverage output to FV Currently gotestsum just outputs the package-level metrics. For FV it would be useful to see the per-func metrics for the main package. Signed-off-by: Dominic Evans --- .github/workflows/fvt.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/fvt.yml b/.github/workflows/fvt.yml index 8dcd933e7..c28741373 100644 --- a/.github/workflows/fvt.yml +++ b/.github/workflows/fvt.yml @@ -59,6 +59,10 @@ jobs: nohup sudo tcpdump -i lo -w "fvt-kafka-${{ inputs.kafka-version }}.pcap" portrange 29091-29095 >/dev/null 2>&1 & echo $! >tcpdump.pid make test_functional + echo "## Code Coverage" >>$GITHUB_STEP_SUMMARY + echo "|Filename|Function|Coverage|" >>$GITHUB_STEP_SUMMARY + echo "|--------|--------|--------|" >>$GITHUB_STEP_SUMMARY + go tool cover -func=profile.out | sed -E -e 's/[[:space:]]+/|/g' -e 's/$/|/g' -e 's/^/|/g' >>$GITHUB_STEP_SUMMARY - name: Stop tcpdump if: always() run: |