From 03cd5f6896eb488104f2cf93718bdf88f03c6ea1 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 6 Nov 2026 14:51:28 -0700 Subject: [PATCH 1/2] Add color coding to test status in summary --- .github/workflows/relocatability.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/relocatability.yml b/.github/workflows/relocatability.yml index 23a2c2d..f219ba3 100644 --- a/.github/workflows/relocatability.yml +++ b/.github/workflows/relocatability.yml @@ -85,13 +85,15 @@ jobs: run: | import json, os + colours = {"PASS": "🟢", "FAIL": "🔴", "SKIP": "🟡"} + lines = [] for strategy in ("patch", "origin"): # Fails the job if the harness crashed instead of reporting. with open(f"results-{strategy}.json") as file: results = json.load(file) lines += [f"### `--strategy {strategy}`", "", "| Check | Status | Summary |", "|---|---|---|"] - lines += [f"| `{r['name']}` | {r['status']} | {r['summary']} |" for r in results] + lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results] lines.append("") with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as summary: summary.write("\n".join(lines) + "\n") From d8c4ac9189d52fe7204a0416b308f942aa14ac36 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 9 Nov 2026 11:31:40 -0700 Subject: [PATCH 2/2] Apply suggestion from @hugovk Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/workflows/relocatability.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/relocatability.yml b/.github/workflows/relocatability.yml index f219ba3..f6552b1 100644 --- a/.github/workflows/relocatability.yml +++ b/.github/workflows/relocatability.yml @@ -93,7 +93,7 @@ jobs: with open(f"results-{strategy}.json") as file: results = json.load(file) lines += [f"### `--strategy {strategy}`", "", "| Check | Status | Summary |", "|---|---|---|"] - lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results] + lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results] lines.append("") with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as summary: summary.write("\n".join(lines) + "\n")