Skip to content

Commit d2d99ce

Browse files
committed
configuration
1 parent f3903c7 commit d2d99ce

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,28 @@ jobs:
1919

2020
- name: Download MetaTrader5 Installer
2121
run: |
22-
Invoke-WebRequest `
23-
-Uri "https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe" `
22+
Invoke-WebRequest `
23+
-Uri "https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe" `
2424
-OutFile "mt5setup.exe"
2525
shell: pwsh
2626

2727
- name: Install MetaTrader5
2828
run: |
2929
$process = Start-Process -FilePath ".\mt5setup.exe" -ArgumentList "/auto", "/portable" -PassThru
30-
$process.WaitForExit(300000)
30+
$process.WaitForExit(300000) # Wait for up to 5 minutes
3131
if (-not $process.HasExited) {
3232
Write-Host "MT5 installer stuck, killing..."
3333
Stop-Process -Id $process.Id -Force
3434
exit 1
3535
}
3636
shell: pwsh
3737

38+
- name: Copy MT5 configuration
39+
run: |
40+
# Ensure the config folder exists and copy the saved config files
41+
Copy-Item -Path ".github/mt5-config/*" -Destination ".\MetaTrader 5\config" -Recurse -Force
42+
shell: pwsh
43+
3844
- name: Kill any existing MT5 processes
3945
run: |
4046
Get-Process terminal64 -ErrorAction SilentlyContinue | Stop-Process -Force
@@ -65,6 +71,5 @@ jobs:
6571
- name: Install MetaTrader5 Python package
6672
run: pip install MetaTrader5
6773

68-
6974
- name: Run MT5 test script
7075
run: python tests/integration/test_mt5_connection.py

0 commit comments

Comments
 (0)