Skip to content

Commit bf3f406

Browse files
committed
using env
1 parent 0004c4e commit bf3f406

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,17 @@ jobs:
6767
run: pip install MetaTrader5
6868

6969
- name: Run MT5 Test
70+
env:
71+
MT5_LOGIN: ${{ secrets.MT5_LOGIN }}
72+
MT5_PASSWORD: ${{ secrets.MT5_PASSWORD }}
7073
run: |
7174
python -c "import os, MetaTrader5 as mt5
7275
print('Python version:', os.sys.version)
7376
print('MetaTrader5 version:', mt5.__version__)
7477
for i in range(10):
7578
try:
76-
if mt5.initialize(login=int({{ secrets.MT5_LOGIN }}),
77-
password={{ secrets.MT5_PASSWORD }},
79+
if mt5.initialize(login=int(os.getenv('MT5_LOGIN')),
80+
password=os.getenv('MT5_PASSWORD'),
7881
server='MetaQuotes-Demo',
7982
path='C:\\Program Files\\MetaTrader 5\\terminal64.exe'):
8083
print('MT5 initialized successfully')

0 commit comments

Comments
 (0)