Skip to content

Commit

Permalink
Allow ResultsParser to fail on non-nunit xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
GabLeRoux committed Nov 8, 2024
1 parent 05a00ef commit 5605967
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/model/results-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ const ResultsCheck = {
files.map(async filepath => {
if (!filepath.endsWith('.xml')) return;
core.info(`Processing file ${filepath}...`);
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
core.info(fileData.summary);
runs.push(fileData);
try {
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
core.info(fileData.summary);
runs.push(fileData);
} catch (error: any) {
core.warning(`Failed to parse ${filepath}: ${error.message}`);
}
}),
);

Expand Down

0 comments on commit 5605967

Please sign in to comment.