Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: midays <[email protected]>
  • Loading branch information
midays committed Dec 9, 2024
1 parent 363f646 commit 18f6085
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/windows-nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
choco install nodejs -y
- name: Write Test Script
Expand Down Expand Up @@ -59,7 +58,14 @@ jobs:
$logPathOut = "C:\Users\nonadmin\Documents\actions-runner\work\run-tests-output.log"
$logPathErr = "C:\Users\nonadmin\Documents\actions-runner\work\run-tests-error.log"
# Run script inline
# Debug: Test if paths are accessible
Write-Output "Testing access to log file paths..." | Out-File $logPathOut -Append
if (-Not (Test-Path -Path $logPathOut)) {
Write-Output "Log path $logPathOut is not accessible!" | Out-File $logPathErr -Append
exit 1
}
# Run script inline with LoadUserProfile
Start-Process -FilePath "powershell.exe" `
-ArgumentList "-ExecutionPolicy Bypass -File $scriptPath" `
-Credential $credential `
Expand All @@ -68,11 +74,18 @@ jobs:
-RedirectStandardError $logPathErr `
-Wait
# Verify log file population
if ((Get-Content $logPathOut).Length -eq 0) {
Write-Output "Log file $logPathOut is empty!" | Out-File $logPathErr -Append
exit 1
}
# Output log files to GitHub Actions
Write-Output "--- Run Output ---"
Get-Content -Path $logPathOut
Write-Output "--- Run Error ---"
Get-Content -Path $logPathErr
# stop-ec2-instance:
# needs: [ start-ec2-instance, run-tests ]
# if: always()
Expand Down

0 comments on commit 18f6085

Please sign in to comment.