Validate and integrate fleet intelligence features
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Fix atlas skip merge under lock, tolerate post-auth WS frames in tests, and harden test-suite npm invocation on Windows.
This commit is contained in:
@@ -25,6 +25,20 @@ function Write-Phase([string]$Name) {
|
||||
Write-Host "==============================================================" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
function Invoke-Npm([string[]]$Args) {
|
||||
$prevEAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = 'Continue'
|
||||
try {
|
||||
$out = & npm @Args 2>&1 | ForEach-Object { "$_" }
|
||||
$text = ($out -join "`n").Trim()
|
||||
if ($text) { Write-Host $text }
|
||||
if (-not $LASTEXITCODE -or $LASTEXITCODE -eq 0) { return }
|
||||
throw "npm $($Args -join ' ') failed (exit $LASTEXITCODE)"
|
||||
} finally {
|
||||
$ErrorActionPreference = $prevEAP
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-GoTest([string]$Package) {
|
||||
$prevEAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = 'Continue'
|
||||
@@ -118,15 +132,15 @@ Invoke-Phase "3/8 Fusion module tests" {
|
||||
|
||||
Invoke-Phase "4/8 Frontend unit tests (Vitest)" {
|
||||
Push-Location (Join-Path $Root "server\web")
|
||||
if (-not (Test-Path "node_modules")) { npm install --silent }
|
||||
npm test
|
||||
if (-not (Test-Path "node_modules")) { Invoke-Npm @("install", "--silent") }
|
||||
Invoke-Npm @("test")
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
if (-not $SkipBuild) {
|
||||
Invoke-Phase "5/8 Frontend production build" {
|
||||
Push-Location (Join-Path $Root "server\web")
|
||||
npm run build
|
||||
Invoke-Npm @("run", "build")
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user