From fed267550d4f2cc3b4aad270a607d9dc27cfb580 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 23 Jan 2026 19:01:42 +0000 Subject: [PATCH] ci(test-quickget): use temp file to collect distro rows for sorting Replace string concatenation with temp file approach to fix issue where only the first distro appeared in the summary table. Writing rows to a temp file and sorting it directly is more robust than piping concatenated strings through sort. --- .github/workflows/test-quickget.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-quickget.yml b/.github/workflows/test-quickget.yml index f3e4257..7b08b48 100644 --- a/.github/workflows/test-quickget.yml +++ b/.github/workflows/test-quickget.yml @@ -113,8 +113,8 @@ jobs: TOTAL_SKIPPED=0 HAS_FAILURES=false - # Build per-distro table rows - DISTRO_ROWS="" + # Temp file for collecting per-distro table rows + TEMP_ROWS=$(mktemp) for json_file in results/result-*/result.json; do [ -f "$json_file" ] || continue @@ -139,12 +139,9 @@ jobs: STATUS="✅" fi - DISTRO_ROWS="${DISTRO_ROWS}$(printf '| %s | %s | %s | %s | %s |\n' "${DISTRO}" "${PASSED}" "${FAILED}" "${SKIPPED}" "${STATUS}")" + echo "| ${DISTRO} | ${PASSED} | ${FAILED} | ${SKIPPED} | ${STATUS} |" >> "$TEMP_ROWS" done - # Sort distro rows alphabetically - DISTRO_ROWS_SORTED=$(echo "$DISTRO_ROWS" | sort) - # Write summary header echo "## Test Results 📊" >> "$GITHUB_STEP_SUMMARY" echo "" >> "$GITHUB_STEP_SUMMARY" @@ -160,7 +157,7 @@ jobs: echo "" >> "$GITHUB_STEP_SUMMARY" echo "| Distro | Passed | Failed | Skipped | Status |" >> "$GITHUB_STEP_SUMMARY" echo "|--------|--------|--------|---------|--------|" >> "$GITHUB_STEP_SUMMARY" - echo -n "$DISTRO_ROWS_SORTED" >> "$GITHUB_STEP_SUMMARY" + sort "$TEMP_ROWS" >> "$GITHUB_STEP_SUMMARY" # Collect and display failed URLs if any if [ "$HAS_FAILURES" = true ]; then @@ -183,6 +180,9 @@ jobs: echo "Total Skipped: ${TOTAL_SKIPPED}" echo "==================" + # Clean up temp file + rm -f "$TEMP_ROWS" + # Exit with failure if any distro had failures if [ "$HAS_FAILURES" = true ]; then echo "::error::Some distros have failed downloads. Check the summary for details."