Skip to content

Commit

Permalink
Log filename if parsing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Nov 30, 2022
1 parent b45fb8b commit ac8472f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 9 additions & 3 deletions dist/index.js

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

10 changes: 8 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@ class TestReporter {
return []
}

core.info(`Processing test results for check run ${name}`)
const results: TestRunResult[] = []
for (const {file, content} of files) {
const tr = await parser.parse(file, content)
results.push(tr)
try {
const tr = await parser.parse(file, content)
results.push(tr)
} catch (error) {
core.error(`Processing test results from ${file} failed`)
throw error
}
}

core.info(`Creating check run ${name}`)
Expand Down

0 comments on commit ac8472f

Please sign in to comment.