We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7386cbe commit c43bdc7Copy full SHA for c43bdc7
src/model/results-check.ts
@@ -23,6 +23,11 @@ const ResultsCheck = {
23
if (!filepath.endsWith('.xml')) return;
24
core.info(`Processing file ${filepath}...`);
25
try {
26
+ const content = fs.readFileSync(path.join(artifactsPath, filepath), 'utf8');
27
+ if (!content.includes('<test-results') && !content.includes('<test-run')) {
28
+ // noinspection ExceptionCaughtLocallyJS
29
+ throw new Error('File does not appear to be a NUnit XML file');
30
+ }
31
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
32
core.info(fileData.summary);
33
runs.push(fileData);
0 commit comments