mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 16:20:29 +00:00
ci: run the Windows tests on a runner with KVM (#1369)
Run the Windows tests on `ubuntu-latest-kvm` as a PR job, with the installed Windows cached, minutes instead of ~1h40m. Aligned with https://gitea.com/gitea/gitea-mcp/pulls/321 and https://gitea.com/gitea/cli/pulls/79. Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1369 Reviewed-by: silverwind <[email protected]> Co-authored-by: Zettat123 <[email protected]>
This commit is contained in:
1 parent
f2fbd67962
commit
b65fd0f8f8
6 files changed
+149
-57
No files matched your search
@@ -5,7 +5,7 @@ $root = $PSScriptRoot
|
||||
try {
|
||||
New-Item -ItemType Directory "$root\logs" | Out-Null
|
||||
$env:Path = "C:\git\cmd;C:\git\bin;C:\pwsh;C:\node;$env:Path"
|
||||
git config --global --add safe.directory C:/OEM/src # setup copied it as SYSTEM, the tests run as the logged-on user
|
||||
git config --global --add safe.directory C:/tests/src
|
||||
|
||||
$failed = 0
|
||||
Write-Output "==> Running $((Get-Content "$root\tests.txt").Count) test binaries on $([Environment]::ProcessorCount) cores"
|
||||
@@ -13,7 +13,7 @@ try {
|
||||
$binary, $package = $_ -split ' ', 2
|
||||
$started = Get-Date
|
||||
Set-Location "$using:root\src\$package"
|
||||
cmd.exe /d /c "$using:root\bin\$binary -test.v -test.timeout=60m -test.parallel=8 > $using:root\logs\$($package -replace '/', '-').log 2>&1"
|
||||
cmd.exe /d /c "$using:root\bin\$binary -test.v -test.paniconexit0 -test.timeout=60m -test.parallel=8 > $using:root\logs\$($package -replace '/', '-').log 2>&1"
|
||||
[pscustomobject]@{ Package = $package; ExitCode = $LASTEXITCODE; Seconds = [int]((Get-Date) - $started).TotalSeconds }
|
||||
} | ForEach-Object {
|
||||
$line = "ok $($_.Package) $($_.Seconds)s"
|
||||
|
||||
Reference in new issue
Block a user