diff --git a/README.md b/README.md index 81d04a5..a7e4674 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,7 @@ jobs: | time | Test execution time [ms] | | url | Check run URL | | url_html | Check run URL HTML | +| summary | Generated test report summary in Markdown format | | slug_prefix| Random anchor links slug prefix generated for the summary headers | ## Supported formats diff --git a/action.yml b/action.yml index 577b0c3..ef1aeff 100644 --- a/action.yml +++ b/action.yml @@ -130,6 +130,8 @@ outputs: description: Check run URL url_html: description: Check run URL HTML + summary: + description: Generated test report summary in Markdown format slug_prefix: description: Random prefix added to generated report anchor slugs for this action run runs: diff --git a/dist/index.js b/dist/index.js index 2847890..b4a075b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59089,6 +59089,7 @@ class TestReporter { }, shortSummary); info('Summary content:'); info(summary); + setOutput('summary', summary); await summary_summary.addRaw(summary).write(); } else { @@ -59119,6 +59120,7 @@ class TestReporter { }); info('Creating annotations'); const annotations = getAnnotations(results, this.maxAnnotations); + setOutput('summary', summary); const isFailed = this.failOnError && results.some(tr => tr.result === 'failed'); const conclusion = isFailed ? 'failure' : 'success'; info(`Updating check run conclusion (${conclusion}) and output`); diff --git a/src/main.ts b/src/main.ts index eb1b3a5..f6cfcc0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -221,6 +221,7 @@ class TestReporter { core.info('Summary content:') core.info(summary) + core.setOutput('summary', summary) await core.summary.addRaw(summary).write() } else { core.info(`Creating check run ${name}`) @@ -252,6 +253,7 @@ class TestReporter { core.info('Creating annotations') const annotations = getAnnotations(results, this.maxAnnotations) + core.setOutput('summary', summary) const isFailed = this.failOnError && results.some(tr => tr.result === 'failed') const conclusion = isFailed ? 'failure' : 'success'