Skip to content

Commit 3bca9a1

Browse files
committed
convert dasl json to md table
1 parent 1e4e701 commit 3bca9a1

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,27 @@ jobs:
4444
UV_PYTHON: "3.13" # DASL testing requires Python 3.13+
4545
run: |
4646
RESULT_JSON=$(uv run --with cbor2 python main.py libipld)
47+
4748
{
4849
echo "## DASL Results"
4950
echo
50-
echo '```json'
51-
echo "$RESULT_JSON"
52-
echo '```'
51+
echo "Metadata:"
52+
echo
53+
echo "- Link: $(echo "$RESULT_JSON" | jq -r '.metadata.link')"
54+
echo "- Version: $(echo "$RESULT_JSON" | jq -r '.metadata.version')"
55+
echo
56+
echo "### Per-file summary"
57+
echo
58+
echo "| File | Total | Passed | Failed |"
59+
echo "|------|-------|--------|--------|"
60+
echo "$RESULT_JSON" | jq -r '
61+
.files
62+
| to_entries[]
63+
| .key as $file
64+
| ( [ .value[] | .pass ] ) as $passes
65+
| ($passes | length) as $total
66+
| ($passes | map(select(. == true)) | length) as $passed
67+
| ($total - $passed) as $failed
68+
| "| \($file) | \($total) | \($passed) | \($failed) |"
69+
'
5370
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)