From 783b60c669b3814d9cd2e4ef703560ca33df251e Mon Sep 17 00:00:00 2001 From: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com> Date: Sun, 17 Nov 2024 02:40:47 +0100 Subject: [PATCH] ci: add tparse to improve test output formatting Signed-off-by: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com> --- .github/workflows/test.yml | 10 ++++++++-- .gitignore | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 451ac702..7173e5ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,16 @@ jobs: with: go-version-file: go.mod - - name: Run all go tests + - name: Install dependencies run: | + go install github.com/mfridman/tparse@latest go mod download - go test -race -count=1 -coverprofile cover.out -v ./... + + - name: Run all go tests + run: | + go test -v -count=1 -race ./... -json -coverpkg ./... \ + | tee output.jsonl | tparse -notests -follow -all || true + tparse -format markdown -file output.jsonl -all -slow 20 > $GITHUB_STEP_SUMMARY traceroute: name: E2E - Traceroute diff --git a/.gitignore b/.gitignore index 22485668..2528e247 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +output.jsonl # Dependency directories (remove the comment below to include it) # vendor/