Skip to content

Commit

Permalink
add task kill for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
shwet2407 committed Oct 7, 2024
1 parent 18aca56 commit 7e4ef74
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/~reusable_e2e_by_OS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,14 @@ jobs:
try {
$process = Start-Process -FilePath 'npm' -ArgumentList 'run start' -NoNewWindow -PassThru
if ($process.WaitForExit($timeout)) {
echo 'E2E tests completed successfully'
exit 0
if ($process.ExitCode -eq 0) {
echo 'E2E tests completed successfully'
exit 0
} else {
echo "E2E tests failed with exit code $($process.ExitCode). Retrying..."
Stop-Process -Id $process.Id
taskkill /f /im node.exe
}
} else {
echo 'E2E tests timed out. Retrying...'
Stop-Process -Id $process.Id
Expand Down

0 comments on commit 7e4ef74

Please sign in to comment.