Skip to content

Commit 5605967

Browse files
committed
Allow ResultsParser to fail on non-nunit xml files
1 parent 05a00ef commit 5605967

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/model/results-check.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ const ResultsCheck = {
2222
files.map(async filepath => {
2323
if (!filepath.endsWith('.xml')) return;
2424
core.info(`Processing file ${filepath}...`);
25-
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
26-
core.info(fileData.summary);
27-
runs.push(fileData);
25+
try {
26+
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
27+
core.info(fileData.summary);
28+
runs.push(fileData);
29+
} catch (error: any) {
30+
core.warning(`Failed to parse ${filepath}: ${error.message}`);
31+
}
2832
}),
2933
);
3034

0 commit comments

Comments
 (0)