mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Improve logging and error handling
This commit is contained in:
parent
967dbab3c6
commit
1ab5efa052
7 changed files with 174 additions and 33 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import * as core from '@actions/core'
|
||||
import {TestExecutionResult, TestRunResult, TestSuiteResult} from './test-results'
|
||||
import {Align, Icon, link, table} from '../utils/markdown-utils'
|
||||
import {slug} from '../utils/slugger'
|
||||
|
|
@ -14,6 +15,7 @@ export default function getReport(results: TestRunResult[]): string {
|
|||
}
|
||||
|
||||
function getRunSummary(tr: TestRunResult): string {
|
||||
core.info('Generating check run summary')
|
||||
const time = `${(tr.time / 1000).toFixed(3)}s`
|
||||
const headingLine1 = `### ${tr.path}`
|
||||
const headingLine2 = `**${tr.tests}** tests were completed in **${time}** with **${tr.passed}** passed, **${tr.skipped}** skipped and **${tr.failed}** failed.`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue