Skip to content

Commit 18c65d1

Browse files
committed
inline
1 parent 99335a8 commit 18c65d1

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,20 @@ jobs:
5858
run: pip install MetaTrader5
5959

6060
- name: Run Python inline script
61+
shell: pwsh
6162
run: |
62-
python -c "
63-
import MetaTrader5 as mt5
64-
import time
63+
python - <<EOF
64+
import MetaTrader5 as mt5
65+
import time
6566

66-
print('Testing MT5 initialization...')
67-
time.sleep(5) # Extra sleep to ensure MT5 ready
67+
print('Testing MT5 initialization...')
68+
time.sleep(5) # Extra sleep to ensure MT5 ready
69+
70+
if not mt5.initialize():
71+
print('Failed to initialize:', mt5.last_error())
72+
exit(1)
73+
else:
74+
print('MT5 initialized successfully')
75+
mt5.shutdown()
76+
EOF
6877

69-
if not mt5.initialize():
70-
print('Failed to initialize:', mt5.last_error())
71-
exit(1)
72-
else:
73-
print('MT5 initialized successfully')
74-
mt5.shutdown()
75-
"
76-
shell: pwsh

0 commit comments

Comments
 (0)