Merge upstream/main and rebuild dist files

pull/282/head
Ejnar Arechavala 2025-03-03 10:13:44 -08:00
commit 3255669e84
3 changed files with 26 additions and 7 deletions

16
dist/index.js generated vendored
View File

@ -1019,9 +1019,19 @@ const ResultsCheck = {
if (!filepath.endsWith('.xml'))
return;
core.info(`Processing file ${filepath}...`);
const fileData = yield results_parser_1.default.parseResults(path_1.default.join(artifactsPath, filepath));
core.info(fileData.summary);
runs.push(fileData);
try {
const content = fs.readFileSync(path_1.default.join(artifactsPath, filepath), 'utf8');
if (!content.includes('<test-run')) {
// noinspection ExceptionCaughtLocallyJS
throw new Error('File does not appear to be a NUnit XML file');
}
const fileData = yield results_parser_1.default.parseResults(path_1.default.join(artifactsPath, filepath));
core.info(fileData.summary);
runs.push(fileData);
}
catch (error) {
core.warning(`Failed to parse ${filepath}: ${error.message}`);
}
})));
// Combine all results into a single run summary
const runSummary = new results_meta_1.RunMeta(checkName);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -22,9 +22,18 @@ 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 content = fs.readFileSync(path.join(artifactsPath, filepath), 'utf8');
if (!content.includes('<test-run')) {
// noinspection ExceptionCaughtLocallyJS
throw new Error('File does not appear to be a NUnit XML file');
}
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}`);
}
}),
);