Add createCheck to display test results in GitHub UI

pull/97/head
David Finol 2021-02-22 22:20:24 -06:00
parent bbdea0a1e4
commit 4b81cfa368
4 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,7 @@ class Input {
const rawProjectPath = getInput('projectPath') || '.';
const rawArtifactsPath = getInput('artifactsPath') || 'artifacts';
const rawUseHostNetwork = getInput('useHostNetwork') || 'false';
const createCheck = getInput('createCheck') || 'false';
const rawCreateCheck = getInput('createCheck') || 'false';
const githubToken = getInput('githubToken') || '';
const customParameters = getInput('customParameters') || ''; // Validate input
if (!includes(this.testModes, testMode)) {
@ -44,6 +44,7 @@ class Input {
const projectPath = rawProjectPath.replace(/\/$/, '');
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
const useHostNetwork = rawUseHostNetwork === 'true';
const createCheck = rawCreateCheck === 'true';
const unityVersion =
rawUnityVersion === 'auto' ? UnityVersionParser.read(projectPath) : rawUnityVersion;

View File

@ -27,7 +27,7 @@ class ReportConverter {
suites.forEach(suite => {
innerResult.push(ReportConverter.convertSuite(suite));
});
core.debug(`innerResult length ${innerResult.length}`);
core.debug(`suite innerResult length ${innerResult.length}`);
return innerResult;
}
@ -47,7 +47,7 @@ class ReportConverter {
core.debug(`tests pushed result to length ${result.length}`);
}
core.debug(`result length ${result.length}`);
core.debug(`suite result length ${result.length}`);
return result;
}

View File

@ -30,7 +30,6 @@ class ResultsCheck {
runSummary.skipped += run.skipped;
runSummary.failed += run.failed;
runSummary.duration += run.duration;
core.debug(`Run suites length ${run.suites.length}`);
run.suites.forEach(suite => {
runSummary.addTests(suite.tests);
});
@ -43,6 +42,7 @@ class ResultsCheck {
// Create check
await ResultsCheck.createCheck(githubToken, runs, runSummary, runSummary.extractAnnotations());
return runSummary.failed;
}
static async parseReport(filepath) {