Skip to content

Commit ff0d647

Browse files
committed
python issue
1 parent 0e68293 commit ff0d647

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,17 @@ jobs:
4747
- name: Install MetaTrader5 Python package
4848
run: pip install MetaTrader5
4949

50-
- name: Run your Python script
50+
- name: Run Python inline script
5151
run: |
52-
python - << 'EOF'
52+
python -c "
5353
import MetaTrader5 as mt5
54-
55-
if not mt5.initialize(path=r"C:/Program Files/MetaTrader 5/terminal64.exe", timeout=300000):
56-
print("initialize() failed, error code:", mt5.last_error())
54+
print('Testing MT5 initialization...')
55+
if not mt5.initialize():
56+
print('Failed to initialize:', mt5.last_error())
5757
exit(1)
58-
59-
# Example: print account info
60-
print(mt5.account_info())
61-
62-
mt5.shutdown()
63-
EOF
58+
else:
59+
print('MT5 initialized successfully')
60+
mt5.shutdown()
61+
"
6462
shell: pwsh
63+

0 commit comments

Comments
 (0)