mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-28 21:59:06 +08:00
fix: Action did not work on Windows runners. (#257)
* Remove symlink files * Update entrypoint scripts for windows runner * Add windows runner tests * Fix unity editor path * Set -nographics option for avoid d3d11 initialization error * Fix Unity project path in windows standalone build script
This commit is contained in:
2720
dist/index.js
generated
vendored
2720
dist/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
1
dist/main.js
vendored
1
dist/main.js
vendored
@@ -1 +0,0 @@
|
||||
index.js
|
||||
3
dist/main.js
vendored
Normal file
3
dist/main.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const index = require('./index.js');
|
||||
|
||||
index.main();
|
||||
29
dist/platforms/windows/run_tests.ps1
vendored
29
dist/platforms/windows/run_tests.ps1
vendored
@@ -67,24 +67,24 @@ foreach ( $platform in ${env:TEST_PLATFORMS}.Split(";") )
|
||||
Write-Output ""
|
||||
|
||||
# Create directories if they do not exist
|
||||
if(-Not (Test-Path -Path $Env:UNITY_PROJECT_PATH\Assets\Editor))
|
||||
if(-Not (Test-Path -Path $UNITY_PROJECT_PATH\Assets\Editor))
|
||||
{
|
||||
# We use -Force to suppress output, doesn't overwrite anything
|
||||
New-Item -ItemType Directory -Force -Path $Env:UNITY_PROJECT_PATH\Assets\Editor
|
||||
New-Item -ItemType Directory -Force -Path $UNITY_PROJECT_PATH\Assets\Editor
|
||||
}
|
||||
if(-Not (Test-Path -Path $Env:UNITY_PROJECT_PATH\Assets\Player))
|
||||
if(-Not (Test-Path -Path $UNITY_PROJECT_PATH\Assets\Player))
|
||||
{
|
||||
# We use -Force to suppress output, doesn't overwrite anything
|
||||
New-Item -ItemType Directory -Force -Path $Env:UNITY_PROJECT_PATH\Assets\Player
|
||||
}
|
||||
|
||||
# Copy the scripts
|
||||
Copy-Item -Path "c:\UnityStandaloneScripts\Assets\Editor" -Destination $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||
Copy-Item -Path "c:\UnityStandaloneScripts\Assets\Player" -Destination $Env:UNITY_PROJECT_PATH\Assets\Player -Recurse
|
||||
Copy-Item -Path "c:\UnityStandaloneScripts\Assets\Editor" -Destination $UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||
Copy-Item -Path "c:\UnityStandaloneScripts\Assets\Player" -Destination $UNITY_PROJECT_PATH\Assets\Player -Recurse
|
||||
|
||||
# Verify recursive paths
|
||||
Get-ChildItem -Path $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||
Get-ChildItem -Path $Env:UNITY_PROJECT_PATH\Assets\Player -Recurse
|
||||
Get-ChildItem -Path $UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||
Get-ChildItem -Path $UNITY_PROJECT_PATH\Assets\Player -Recurse
|
||||
|
||||
$runTests="-runTests -testPlatform StandaloneWindows64 -builtTestRunnerPath $UNITY_PROJECT_PATH\Build\UnityTestRunner-Standalone.exe"
|
||||
}
|
||||
@@ -106,7 +106,20 @@ foreach ( $platform in ${env:TEST_PLATFORMS}.Split(";") )
|
||||
}
|
||||
}
|
||||
|
||||
$TEST_OUTPUT = Start-Process -NoNewWindow -Wait -PassThru "C:\Program Files\Unity\Hub\Editor\${env:UNITY_VERSION}\editor\Unity.exe" -ArgumentList "-batchmode -logFile $FULL_ARTIFACTS_PATH\$platform.log -projectPath $UNITY_PROJECT_PATH -coverageResultsPath $FULL_COVERAGE_RESULTS_PATH $runTests -enableCodeCoverage -debugCodeOptimization -coverageOptions ${env:COVERAGE_OPTIONS} ${env:CUSTOM_PARAMETERS}"
|
||||
$TEST_OUTPUT = Start-Process -FilePath "$Env:UNITY_PATH/Editor/Unity.exe" `
|
||||
-NoNewWindow `
|
||||
-Wait `
|
||||
-PassThru `
|
||||
-ArgumentList "-batchmode `
|
||||
-nographics `
|
||||
-logFile $FULL_ARTIFACTS_PATH\$platform.log `
|
||||
-projectPath $UNITY_PROJECT_PATH `
|
||||
-coverageResultsPath $FULL_COVERAGE_RESULTS_PATH `
|
||||
$runTests `
|
||||
-enableCodeCoverage `
|
||||
-debugCodeOptimization `
|
||||
-coverageOptions ${env:COVERAGE_OPTIONS} `
|
||||
${env:CUSTOM_PARAMETERS}"
|
||||
|
||||
# Catch exit code
|
||||
$TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode
|
||||
|
||||
1
dist/post.js
vendored
1
dist/post.js
vendored
@@ -1 +0,0 @@
|
||||
index.js
|
||||
3
dist/post.js
vendored
Normal file
3
dist/post.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const index = require('./index.js');
|
||||
|
||||
index.post();
|
||||
Reference in New Issue
Block a user