@@ -294,56 +294,35 @@ jobs:
294294 )
295295
296296 $overallFailed = $false
297+
297298 $logRoot = Join-Path $env:TEMP "now-tests"
298299 New-Item -ItemType Directory -Force -Path $logRoot | Out-Null
299- $logPath = Join-Path $logRoot "run_test_app_nodejs.log"
300-
301- Write-Host "================================"
302- Write-Host "Testing: $scriptPath --silent app nodejs"
303- Write-Host "================================"
304300
305- & $scriptPath --silent app nodejs 2>&1 | Tee-Object -FilePath $logPath -Append
306- $exitCode = $LASTEXITCODE
301+ foreach ($config in $testConfigs) {
302+ $testType = $config[0]
303+ $techStack = $config[1]
307304
308- if ($exitCode -eq 0) {
309- Write-Host "✅ app / nodejs completed (exit code: $exitCode)"
310- } else {
311- Write-Host "⚠️ app / nodejs exited with code: $exitCode"
312- if (Test-Path $logPath) {
313- Write-Host "Log output (last 20 lines):"
314- Get-Content -Path $logPath -Tail 20
315- }
316- exit 1
317- }
305+ Write-Host "================================"
306+ Write-Host "Testing: $scriptPath --silent $testType $techStack"
307+ Write-Host "================================"
318308
319- # $logRoot = Join-Path $env:TEMP "now-tests"
320- # New-Item -ItemType Directory -Force -Path $logRoot | Out-Null
309+ $logPath = Join-Path $logRoot "run_test_${testType}_${techStack}.log"
321310
322- # foreach ($config in $testConfigs) {
323- # $testType = $config[0]
324- # $techStack = $config[1]
311+ & $scriptPath --silent $testType $techStack 2>&1 | Tee-Object -FilePath $logPath -Append
312+ $exitCode = $LASTEXITCODE
325313
326- # Write-Host "================================"
327- # Write-Host "Testing: $scriptPath --silent $testType $techStack"
328- # Write-Host "================================"
314+ if ($exitCode -eq 0) {
315+ Write-Host "✅ $testType / $techStack completed (exit code: $exitCode)"
316+ } else {
317+ Write-Host "⚠️ $testType / $techStack exited with code: $exitCode"
318+ $overallFailed = $true
329319
330- # $logPath = Join-Path $logRoot "run_test_${testType}_${techStack}.log"
331-
332- # & $scriptPath --silent $testType $techStack 2>&1 | Tee-Object -FilePath $logPath -Append
333- # $exitCode = $LASTEXITCODE
334-
335- # if ($exitCode -eq 0) {
336- # Write-Host "✅ $testType / $techStack completed (exit code: $exitCode)"
337- # } else {
338- # Write-Host "⚠️ $testType / $techStack exited with code: $exitCode"
339- # $overallFailed = $true
340-
341- # if (Test-Path $logPath) {
342- # Write-Host "Log output (last 20 lines):"
343- # Get-Content -Path $logPath -Tail 20
344- # }
345- # }
346- # }
320+ if (Test-Path $logPath) {
321+ Write-Host "Log output (last 20 lines):"
322+ Get-Content -Path $logPath -Tail 20
323+ }
324+ }
325+ }
347326
348327 if ($overallFailed) {
349328 Write-Error "One or more configurations failed."
0 commit comments