mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Log filename if parsing fails
This commit is contained in:
parent
b45fb8b405
commit
ac8472f51a
2 changed files with 17 additions and 5 deletions
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
|
|
@ -375,11 +375,17 @@ class TestReporter {
|
|||
core.warning(`No file matches path ${this.path}`);
|
||||
return [];
|
||||
}
|
||||
core.info(`Processing test results for check run ${name}`);
|
||||
const results = [];
|
||||
for (const { file, content } of files) {
|
||||
core.info(`Processing test results from ${file}`);
|
||||
const tr = yield parser.parse(file, content);
|
||||
results.push(tr);
|
||||
try {
|
||||
const tr = yield 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}`);
|
||||
const createResp = yield this.octokit.rest.checks.create(Object.assign({ head_sha: this.context.sha, name, status: 'in_progress', output: {
|
||||
|
|
|
|||
10
src/main.ts
10
src/main.ts
|
|
@ -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}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue