@@ -30,14 +30,33 @@ jobs:
30
30
run : |
31
31
Start-Process -FilePath .\mt5setup.exe -ArgumentList "/auto" -Wait
32
32
# Give installation some time to complete
33
- Start-Sleep -Seconds 30
33
+ Start-Sleep -Seconds 60
34
34
35
- - name : Verify MetaTrader 5 Installation
35
+ - name : Verify MetaTrader 5 Installation and Start Terminal
36
36
run : |
37
- if (!(Test-Path "C:\Program Files\MetaTrader 5\terminal64.exe")) {
38
- Write-Error "MetaTrader 5 installation failed."
37
+ $mtPath = "C:\Program Files\MetaTrader 5\terminal64.exe"
38
+ if (!(Test-Path $mtPath)) {
39
+ Write-Error "MetaTrader 5 installation failed. Terminal executable not found."
39
40
exit 1
40
41
}
42
+ Write-Host "MetaTrader 5 found at: $mtPath"
43
+
44
+ # List installation directory contents for debugging
45
+ Write-Host "Listing MetaTrader 5 installation directory:"
46
+ Get-ChildItem "C:\Program Files\MetaTrader 5"
47
+
48
+ # Start MT5 terminal and give it time to initialize
49
+ Start-Process -FilePath $mtPath -ArgumentList "/portable" -PassThru
50
+ Write-Host "Started MetaTrader 5 terminal"
51
+ Start-Sleep -Seconds 30
52
+
53
+ # Verify MT5 process is running
54
+ $process = Get-Process "terminal64" -ErrorAction SilentlyContinue
55
+ if ($process) {
56
+ Write-Host "MetaTrader 5 terminal is running with PID: $($process.Id)"
57
+ } else {
58
+ Write-Error "MetaTrader 5 terminal is not running."
59
+ }
41
60
42
61
- name : Install Python dependencies
43
62
run : |
46
65
47
66
- name : Test MetaTrader5 connection
48
67
run : |
68
+ # Print environment information
69
+ Write-Host "Environment variables:"
70
+ Get-ChildItem Env: | Format-Table -AutoSize
71
+
72
+ # Run the test with diagnostic info
49
73
python tests/integration/test_mt5_connection.py
0 commit comments