Skip to content

Commit

Permalink
- add more logging and clarify wording for test report parsing
Browse files Browse the repository at this point in the history
  - FIX #1051
  • Loading branch information
mikepenz authored Mar 14, 2024
1 parent 034100c commit 0289ec7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
7 changes: 6 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ export async function run(): Promise<void> {
skipped: 0,
failed: 0,
passed: 0,
foundFiles: 0,
annotations: []
}

core.info(`Retrieved ${reportsCount} reports to process.`)
core.info(`Preparing ${reportsCount} to process as configured.`)

for (let i = 0; i < reportsCount; i++) {
const testResult = await parseTestReports(
Expand All @@ -79,11 +80,14 @@ export async function run(): Promise<void> {
truncateStackTraces
)

core.info(`Found and parsed ${testResult.foundFiles} test reports.`)

mergedResult.totalCount += testResult.totalCount
mergedResult.skipped += testResult.skipped
mergedResult.failed += testResult.failed
mergedResult.passed += testResult.passed
testResults.push(testResult)

}

core.setOutput('total', mergedResult.totalCount)
Expand Down
4 changes: 4 additions & 0 deletions src/testParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface TestResult {
skipped: number
failed: number
passed: number
foundFiles: number
annotations: Annotation[]
}

Expand Down Expand Up @@ -434,7 +435,9 @@ export async function parseTestReports(
let annotations: Annotation[] = []
let totalCount = 0
let skipped = 0
let foundFiles = 0
for await (const file of globber.globGenerator()) {
foundFiles++
core.debug(`Parsing report file: ${file}`)

const {
Expand Down Expand Up @@ -478,6 +481,7 @@ export async function parseTestReports(
skipped,
failed,
passed,
foundFiles,
annotations
}
}
Expand Down

0 comments on commit 0289ec7

Please sign in to comment.