From 13974e26f7aa56c9c944c1326804267a8cc2d27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20M=C3=B6rling?= Date: Tue, 19 May 2026 20:40:26 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20coverage=20summary=20table=20?= =?UTF-8?q?=E2=80=94=20remove=20Status=20column=20and=20trailing=20empty?= =?UTF-8?q?=20cell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 4-column table had a trailing empty column on the right because the Status column was removed but the right border was still placed after it. This created a visual glitch in the Forgejo log viewer. - Convert to a clean 3-column table: Layer | Lines | Branch - Remove emojis from table cells (they're double-width and break alignment) - Add a plain-text pass/fail line below the table instead - Use consistent 7-char padding for all percentage values so % signs align Result: coverage summary renders cleanly in the CI job log. --- .forgejo/workflows/ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 65af685..762464c 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -56,18 +56,18 @@ jobs: const branchMissed = +lastBranch[1], branchCovered = +lastBranch[2]; const linePct = (lineCovered / (lineMissed + lineCovered) * 100).toFixed(1); const branchPct = (branchCovered / (branchMissed + branchCovered) * 100).toFixed(1); - const lineStatus = linePct >= 70 ? '✅' : '❌'; - const branchStatus = branchPct >= 60 ? '✅' : '❌'; + const allPass = linePct >= 70 && branchPct >= 60; console.log(''); - console.log('╔══════════════════════════════════════════════════════╗'); - console.log('║ Coverage Summary — Bilhej ║'); - console.log('╠══════════════════════╦══════════╦══════════╦═════════╣'); - console.log('║ Layer │ Lines │ Branch │ Status ║'); - console.log('╠══════════════════════╬══════════╬══════════╬═════════╣'); - console.log('║ Backend │ ' + linePct.padStart(6) + '% │ ' + branchPct.padStart(6) + '% │ ' + lineStatus + ' ' + branchStatus + ' ║'); - console.log('╠══════════════════════╬══════════╬══════════╬═════════╣'); - console.log('║ Thresholds │ 70.0% │ 60.0% │ ║'); - console.log('╚══════════════════════╩══════════╩══════════╩═════════╝'); + console.log('╔════════════════╦══════════╦════════════╗'); + console.log('║ Coverage Summary — Bilhej ║'); + console.log('╠════════════════╬══════════╬════════════╣'); + console.log('║ Layer │ Lines │ Branch ║'); + console.log('╠════════════════╬══════════╬════════════╣'); + console.log('║ Backend │ ' + (linePct + '%').padStart(7) + ' │ ' + (branchPct + '%').padStart(7) + ' ║'); + console.log('╠════════════════╬══════════╬════════════╣'); + console.log('║ Thresholds │ ' + '70.0%'.padStart(7) + ' │ ' + '60.0%'.padStart(7) + ' ║'); + console.log('╚════════════════╩══════════╩════════════╝'); + console.log(allPass ? 'All backend thresholds met.' : 'Some backend thresholds missed.'); console.log(''); console.log('Frontend coverage printed above by Vitest text reporter.'); console.log('Download full HTML reports from the Artifacts tab.');