diff --git a/packages/manager/.changeset/pr-11200-tests-1730467459621.md b/packages/manager/.changeset/pr-11200-tests-1730467459621.md
new file mode 100644
index 00000000000..3aa894d7438
--- /dev/null
+++ b/packages/manager/.changeset/pr-11200-tests-1730467459621.md
@@ -0,0 +1,5 @@
+---
+"@linode/manager": Tests
+---
+
+Slight improvements to GitHub test result comment formatting ([#11200](https://github.com/linode/manager/pull/11200))
diff --git a/scripts/junit-summary/formatters/github-formatter.ts b/scripts/junit-summary/formatters/github-formatter.ts
index d039db83bed..7b2af1ca938 100644
--- a/scripts/junit-summary/formatters/github-formatter.ts
+++ b/scripts/junit-summary/formatters/github-formatter.ts
@@ -23,11 +23,16 @@ export const githubFormatter: Formatter = (
metadata: Metadata,
_junitData: TestSuites[]
) => {
+ const title = !!metadata.pipelineTitle
+ ? `## ${metadata.pipelineTitle}`
+ : null;
+
const headline = (() => {
- const headingMarkdown = '## ';
+ const headingMarkdown = '### ';
+
const description = runInfo.failing
- ? `${runInfo.failing} failing ${pluralize(runInfo.failing, 'test', 'tests')} on`
- : `Passing`;
+ ? `:small_red_triangle: ${runInfo.failing} failing ${pluralize(runInfo.failing, 'test', 'tests')} on`
+ : `:tada: ${runInfo.passing} passing ${pluralize(runInfo.passing, 'test', 'tests')} on`;
// If available, render a link for the run.
const runLink = (metadata.runId && metadata.runUrl)
@@ -37,12 +42,28 @@ export const githubFormatter: Formatter = (
return `${headingMarkdown}${description} ${runLink}`;
})();
- const breakdown = `:x: ${runInfo.failing} Failing | :green_heart: ${runInfo.passing} Passing | :arrow_right_hook: ${runInfo.skipped} Skipped | :clock1: ${secondsToTimeString(runInfo.time)}\n\n`;
+ const breakdown = [
+ '
',
+ '',
+ ':x: Failing | ',
+ ':white_check_mark: Passing | ',
+ ':arrow_right_hook: Skipped | ',
+ ':clock1: Duration | ',
+ '
',
+ '',
+ `${runInfo.failing} Failing | `,
+ `${runInfo.passing} Passing | `,
+ `${runInfo.skipped} Skipped | `,
+ `${secondsToTimeString(runInfo.time)} | `,
+ '
',
+ '
',
+ '\n\n',
+ ].join('');
const extra = metadata.extra ? `${metadata.extra}\n\n` : null;
const failedTestSummary = (() => {
- const heading = `### Details`;
+ const heading = `#### Details`;
const failedTestHeader = `Failing Tests |
---|
| Spec | Test |
`;
const failedTestRows = results
.filter((result: TestResult) => result.failing)
@@ -62,7 +83,7 @@ export const githubFormatter: Formatter = (
})();
const rerunNote = (() => {
- const heading = `### Debugging`;
+ const heading = `#### Troubleshooting`;
const failingTestFiles = results
.filter((result: TestResult) => result.failing)
.map((result: TestResult) => result.testFilename);
@@ -81,6 +102,7 @@ export const githubFormatter: Formatter = (
})();
return [
+ title,
headline,
'',
breakdown,