Skip to content

Commit 79f110c

Browse files
committed
validate instalation
1 parent 7327c10 commit 79f110c

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

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

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,33 @@ jobs:
3030
run: |
3131
Start-Process -FilePath .\mt5setup.exe -ArgumentList "/auto" -Wait
3232
# Give installation some time to complete
33-
Start-Sleep -Seconds 30
33+
Start-Sleep -Seconds 60
3434
35-
- name: Verify MetaTrader 5 Installation
35+
- name: Verify MetaTrader 5 Installation and Start Terminal
3636
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."
3940
exit 1
4041
}
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+
}
4160
4261
- name: Install Python dependencies
4362
run: |
@@ -46,4 +65,9 @@ jobs:
4665
4766
- name: Test MetaTrader5 connection
4867
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
4973
python tests/integration/test_mt5_connection.py

0 commit comments

Comments
 (0)