Merge branch 'main' into feature/lcov-support

# Conflicts:
#	dist/index.js
#	src/main.ts
This commit is contained in:
Julien Catania 2024-01-12 16:15:57 +01:00
commit 712fabc3c8
2 changed files with 7 additions and 3 deletions

1
dist/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -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'
import {LcovParser} from './parsers/lcov/lcov-parser' import {LcovParser} from './parsers/lcov/lcov-parser'
async function main(): Promise<void> { async function main(): Promise<void> {
@ -184,7 +183,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)
const 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({
@ -192,7 +195,7 @@ class TestReporter {
conclusion, conclusion,
status: 'completed', status: 'completed',
output: { output: {
title: `${name} ${icon}`, title: shortSummary,
summary, summary,
annotations annotations
}, },