From 19aaf9016ed662cee850ab18a3224cfdada01699 Mon Sep 17 00:00:00 2001 From: Vasanth Dharmaraj Date: Sat, 18 Jun 2022 01:08:45 +0530 Subject: [PATCH 1/2] Suppress "Processing test results from" log --- src/main.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 2777132d..d54fb30b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -148,7 +148,6 @@ class TestReporter { const results: TestRunResult[] = [] for (const {file, content} of files) { - core.info(`Processing test results from ${file}`) const tr = await parser.parse(file, content) results.push(tr) } From ac8472f51a64e7a3d84bfe41ac77320efe950c52 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Wed, 30 Nov 2022 18:49:10 +0100 Subject: [PATCH 2/2] Log filename if parsing fails --- dist/index.js | 12 +++++++++--- src/main.ts | 10 ++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index df75f076..415c454c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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: { diff --git a/src/main.ts b/src/main.ts index 6ee68108..825794ff 100644 --- a/src/main.ts +++ b/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}`)