Skip to content

Commit 8701f97

Browse files
authored
Transpose rows with columns (#97)
1 parent b72c2cd commit 8701f97

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/probe.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,28 +244,24 @@ jobs:
244244
continue
245245
lines.append(f'### {title}')
246246
lines.append('')
247-
# Header row: Server | test1 | test2 | ...
248-
hdr = '| Server | ' + ' | '.join(f'`{short(tid)}`' for tid in cat_tests) + ' |'
249-
sep = '|---' + ''.join('|:---:' for _ in cat_tests) + '|'
247+
# Header row: Test | Expected | Server1 | Server2 | ...
248+
hdr = '| Test | Expected | ' + ' | '.join(f'**{n}**' for n in names) + ' |'
249+
sep = '|---|---' + ''.join('|:---:' for _ in names) + '|'
250250
lines.append(hdr)
251251
lines.append(sep)
252-
# Expected row
253-
exp_cells = []
252+
# One row per test
254253
for tid in cat_tests:
255254
first = lookup[names[0]][tid]
256-
exp_cells.append(first['expected'])
257-
lines.append('| **Expected** | ' + ' | '.join(exp_cells) + ' |')
258-
# Server rows
259-
for n in names:
255+
expected = first['expected']
260256
cells = []
261-
for tid in cat_tests:
257+
for n in names:
262258
r = lookup[n].get(tid)
263259
if not r:
264260
cells.append('—')
265261
else:
266262
icon = '✅' if r['verdict'] == 'Pass' else ('⚠️' if r['verdict'] == 'Warn' else '❌')
267263
cells.append(f"{icon}`{r['got']}`")
268-
lines.append(f"| **{n}** | " + ' | '.join(cells) + ' |')
264+
lines.append(f"| `{short(tid)}` | {expected} | " + ' | '.join(cells) + ' |')
269265
lines.append('')
270266
271267
lines.append(f"<sub>Commit: {commit_id[:7]}</sub>")

0 commit comments

Comments
 (0)