Skip to content

Commit 5755f9a

Browse files
committed
test with no portable
1 parent dbe592e commit 5755f9a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,27 @@ jobs:
4040
python -m pip install --upgrade pip
4141
pip install MetaTrader5
4242
43-
- name: Create MT5 portable configuration
44-
run: |
45-
# Create a portable MT5 directory
46-
mkdir -p "$env:APPDATA\MetaTrader5Portable"
43+
# - name: Create MT5 portable configuration
44+
# run: |
45+
# # Create a portable MT5 directory
46+
# mkdir -p "$env:APPDATA\MetaTrader5Portable"
4747

48-
# Set environment variables to make MT5 run in headless mode
49-
echo "MT5_HEADLESS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
50-
echo "MT5_PORTABLE_PATH=$env:APPDATA\MetaTrader5Portable" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
48+
# # Set environment variables to make MT5 run in headless mode
49+
# echo "MT5_HEADLESS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
50+
# echo "MT5_PORTABLE_PATH=$env:APPDATA\MetaTrader5Portable" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5151

52-
# Copy MT5 files to portable location if needed
53-
if (-not (Test-Path "$env:APPDATA\MetaTrader5Portable\terminal64.exe")) {
54-
Copy-Item -Path "C:\Program Files\MetaTrader 5\*" -Destination "$env:APPDATA\MetaTrader5Portable\" -Recurse
55-
}
52+
# # Copy MT5 files to portable location if needed
53+
# if (-not (Test-Path "$env:APPDATA\MetaTrader5Portable\terminal64.exe")) {
54+
# Copy-Item -Path "C:\Program Files\MetaTrader 5\*" -Destination "$env:APPDATA\MetaTrader5Portable\" -Recurse
55+
# }
5656

57-
# Verify portable setup
58-
if (Test-Path "$env:APPDATA\MetaTrader5Portable\terminal64.exe") {
59-
Write-Host "MetaTrader 5 portable setup created successfully"
60-
} else {
61-
Write-Error "MetaTrader 5 portable setup failed"
62-
exit 1
63-
}
57+
# # Verify portable setup
58+
# if (Test-Path "$env:APPDATA\MetaTrader5Portable\terminal64.exe") {
59+
# Write-Host "MetaTrader 5 portable setup created successfully"
60+
# } else {
61+
# Write-Error "MetaTrader 5 portable setup failed"
62+
# exit 1
63+
# }
6464

6565
- name: Test MT5 initialization
6666
run: |

test/integration/test_mt5_initialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_mt5_initialization():
2929
if not result and mt5_path:
3030
print('Initial attempt failed. Trying with portable path...')
3131
result = mt5.initialize(
32-
path=mt5_path,
32+
path="C:\\Program Files\\MetaTrader 5\\terminal64.exe,
3333
login=0,
3434
password='',
3535
server='',

0 commit comments

Comments
 (0)