Skip to content

Commit 0e68293

Browse files
committed
time out
1 parent ad76fa3 commit 0e68293

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/test-metatrader5-integration.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MetaTrader5 CI Headless Setup
1+
name: Test | MetaTrader5 Integration Test
22

33
on: [push]
44

@@ -21,9 +21,16 @@ jobs:
2121
-OutFile "mt5setup.exe"
2222
shell: pwsh
2323

24-
- name: Install MetaTrader5 silently
24+
- name: Install MetaTrader5
2525
run: |
26-
Start-Process -FilePath ".\mt5setup.exe" -ArgumentList "/silent" -Wait
26+
# Start installer with /auto and /portable, with timeout protection
27+
$process = Start-Process -FilePath ".\mt5setup.exe" -ArgumentList "/auto", "/portable" -PassThru
28+
$process.WaitForExit(300000) # Wait max 5 minutes
29+
if (-not $process.HasExited) {
30+
Write-Host "MT5 installer stuck, killing..."
31+
Stop-Process -Id $process.Id -Force
32+
exit 1
33+
}
2734
shell: powershell
2835

2936
- name: Kill any existing MT5 processes

0 commit comments

Comments
 (0)