mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-02-05 12:36:37 +08:00
Adding useHostNetwork option
This commit is contained in:
committed by
Webber Takken
parent
f02586c1c9
commit
a4e8475a2f
@@ -18,6 +18,7 @@ class Input {
|
||||
const testMode = getInput('testMode') || 'all';
|
||||
const rawProjectPath = getInput('projectPath') || '.';
|
||||
const rawArtifactsPath = getInput('artifactsPath') || 'artifacts';
|
||||
const rawUseHostNetwork = getInput('useHostNetwork') || 'false';
|
||||
const customParameters = getInput('customParameters') || '';
|
||||
|
||||
// Validate input
|
||||
@@ -33,9 +34,14 @@ class Input {
|
||||
throw new Error(`Invalid projectPath "${rawProjectPath}"`);
|
||||
}
|
||||
|
||||
if (rawUseHostNetwork !== 'true' && rawUseHostNetwork !== 'false') {
|
||||
throw new Error(`Invalid useHostNetwork "${rawUseHostNetwork}"`);
|
||||
}
|
||||
|
||||
// Sanitise input
|
||||
const projectPath = rawProjectPath.replace(/\/$/, '');
|
||||
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
||||
const useHostNetwork = rawUseHostNetwork === 'true';
|
||||
|
||||
// Return sanitised input
|
||||
return {
|
||||
@@ -43,6 +49,7 @@ class Input {
|
||||
projectPath,
|
||||
testMode,
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
customParameters,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user