mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 22:37:09 +01:00
Update check title and remove icon
This commit is contained in:
parent
08c81a1fd6
commit
4bb68fffaa
1 changed files with 6 additions and 3 deletions
|
|
@ -19,7 +19,6 @@ import {SwiftXunitParser} from './parsers/swift-xunit/swift-xunit-parser'
|
||||||
|
|
||||||
import {normalizeDirPath, normalizeFilePath} from './utils/path-utils'
|
import {normalizeDirPath, normalizeFilePath} from './utils/path-utils'
|
||||||
import {getCheckRunContext} from './utils/github-utils'
|
import {getCheckRunContext} from './utils/github-utils'
|
||||||
import {Icon} from './utils/markdown-utils'
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
|
@ -183,7 +182,11 @@ class TestReporter {
|
||||||
|
|
||||||
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed')
|
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed')
|
||||||
const conclusion = isFailed ? 'failure' : 'success'
|
const conclusion = isFailed ? 'failure' : 'success'
|
||||||
const icon = isFailed ? Icon.fail : Icon.success
|
|
||||||
|
const passed = results.reduce((sum, tr) => sum + tr.passed, 0)
|
||||||
|
const failed = results.reduce((sum, tr) => sum + tr.failed, 0)
|
||||||
|
const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0)
|
||||||
|
let shortSummary = `${passed} passed, ${failed} failed and ${skipped} skipped `
|
||||||
|
|
||||||
core.info(`Updating check run conclusion (${conclusion}) and output`)
|
core.info(`Updating check run conclusion (${conclusion}) and output`)
|
||||||
const resp = await this.octokit.rest.checks.update({
|
const resp = await this.octokit.rest.checks.update({
|
||||||
|
|
@ -191,7 +194,7 @@ class TestReporter {
|
||||||
conclusion,
|
conclusion,
|
||||||
status: 'completed',
|
status: 'completed',
|
||||||
output: {
|
output: {
|
||||||
title: `${name} ${icon}`,
|
title: shortSummary,
|
||||||
summary,
|
summary,
|
||||||
annotations
|
annotations
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue