Add createCheck to display test results in GitHub UI
parent
bbdea0a1e4
commit
4b81cfa368
File diff suppressed because one or more lines are too long
|
|
@ -21,7 +21,7 @@ class Input {
|
||||||
const rawProjectPath = getInput('projectPath') || '.';
|
const rawProjectPath = getInput('projectPath') || '.';
|
||||||
const rawArtifactsPath = getInput('artifactsPath') || 'artifacts';
|
const rawArtifactsPath = getInput('artifactsPath') || 'artifacts';
|
||||||
const rawUseHostNetwork = getInput('useHostNetwork') || 'false';
|
const rawUseHostNetwork = getInput('useHostNetwork') || 'false';
|
||||||
const createCheck = getInput('createCheck') || 'false';
|
const rawCreateCheck = getInput('createCheck') || 'false';
|
||||||
const githubToken = getInput('githubToken') || '';
|
const githubToken = getInput('githubToken') || '';
|
||||||
const customParameters = getInput('customParameters') || ''; // Validate input
|
const customParameters = getInput('customParameters') || ''; // Validate input
|
||||||
if (!includes(this.testModes, testMode)) {
|
if (!includes(this.testModes, testMode)) {
|
||||||
|
|
@ -44,6 +44,7 @@ class Input {
|
||||||
const projectPath = rawProjectPath.replace(/\/$/, '');
|
const projectPath = rawProjectPath.replace(/\/$/, '');
|
||||||
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
||||||
const useHostNetwork = rawUseHostNetwork === 'true';
|
const useHostNetwork = rawUseHostNetwork === 'true';
|
||||||
|
const createCheck = rawCreateCheck === 'true';
|
||||||
const unityVersion =
|
const unityVersion =
|
||||||
rawUnityVersion === 'auto' ? UnityVersionParser.read(projectPath) : rawUnityVersion;
|
rawUnityVersion === 'auto' ? UnityVersionParser.read(projectPath) : rawUnityVersion;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class ReportConverter {
|
||||||
suites.forEach(suite => {
|
suites.forEach(suite => {
|
||||||
innerResult.push(ReportConverter.convertSuite(suite));
|
innerResult.push(ReportConverter.convertSuite(suite));
|
||||||
});
|
});
|
||||||
core.debug(`innerResult length ${innerResult.length}`);
|
core.debug(`suite innerResult length ${innerResult.length}`);
|
||||||
return innerResult;
|
return innerResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ class ReportConverter {
|
||||||
core.debug(`tests pushed result to length ${result.length}`);
|
core.debug(`tests pushed result to length ${result.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug(`result length ${result.length}`);
|
core.debug(`suite result length ${result.length}`);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class ResultsCheck {
|
||||||
runSummary.skipped += run.skipped;
|
runSummary.skipped += run.skipped;
|
||||||
runSummary.failed += run.failed;
|
runSummary.failed += run.failed;
|
||||||
runSummary.duration += run.duration;
|
runSummary.duration += run.duration;
|
||||||
core.debug(`Run suites length ${run.suites.length}`);
|
|
||||||
run.suites.forEach(suite => {
|
run.suites.forEach(suite => {
|
||||||
runSummary.addTests(suite.tests);
|
runSummary.addTests(suite.tests);
|
||||||
});
|
});
|
||||||
|
|
@ -43,6 +42,7 @@ class ResultsCheck {
|
||||||
|
|
||||||
// Create check
|
// Create check
|
||||||
await ResultsCheck.createCheck(githubToken, runs, runSummary, runSummary.extractAnnotations());
|
await ResultsCheck.createCheck(githubToken, runs, runSummary, runSummary.extractAnnotations());
|
||||||
|
return runSummary.failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async parseReport(filepath) {
|
static async parseReport(filepath) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue