Add createCheck to display test results in GitHub UI
parent
c838b9cba9
commit
94d2fc0be4
File diff suppressed because one or more lines are too long
|
|
@ -15,6 +15,7 @@ class ReportConverter {
|
||||||
meta.duration = Number(run._attributes.duration);
|
meta.duration = Number(run._attributes.duration);
|
||||||
|
|
||||||
meta.addTests(ReportConverter.convertSuite(run['test-suite']));
|
meta.addTests(ReportConverter.convertSuite(run['test-suite']));
|
||||||
|
core.info(`meta length ${meta.suites.length}`);
|
||||||
|
|
||||||
return meta;
|
return meta;
|
||||||
}
|
}
|
||||||
|
|
@ -40,6 +41,7 @@ class ReportConverter {
|
||||||
result.push(...ReportConverter.convertTests(suites._attributes.fullname, tests));
|
result.push(...ReportConverter.convertTests(suites._attributes.fullname, tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info(`result length ${result.length}`);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,15 @@ class ResultsCheck {
|
||||||
|
|
||||||
// Prepare run summary
|
// Prepare run summary
|
||||||
const runSummary = new RunMeta('Test Results');
|
const runSummary = new RunMeta('Test Results');
|
||||||
runs.forEach(suite => {
|
runs.forEach(run => {
|
||||||
runSummary.total += suite.total;
|
runSummary.total += run.total;
|
||||||
runSummary.passed += suite.passed;
|
runSummary.passed += run.passed;
|
||||||
runSummary.skipped += suite.skipped;
|
runSummary.skipped += run.skipped;
|
||||||
runSummary.failed += suite.failed;
|
runSummary.failed += run.failed;
|
||||||
runSummary.duration += suite.duration;
|
runSummary.duration += run.duration;
|
||||||
core.info(suite.suites.length);
|
core.info(`Run suites length ${run.suites.length}`);
|
||||||
suite.suites.forEach(s => {
|
run.suites.forEach(suite => {
|
||||||
runSummary.addTests(s.tests);
|
runSummary.addTests(suite.tests);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,10 @@ export class RunMeta extends Meta {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
addTests(children: TestMeta[]): void {
|
addTests(testsToAdd: TestMeta[]): void {
|
||||||
for (const child of children) {
|
testsToAdd.forEach(test => {
|
||||||
this.addTest(child);
|
this.addTest(test);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addTest(test: TestMeta): void {
|
addTest(test: TestMeta): void {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue