Skip to content

Commit

Permalink
add test workflow secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Ableytner committed Mar 10, 2024
1 parent 95415a5 commit edc00bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Save secrets to file
env:
USERNAME: ${{ secrets.MCUSERNAME }}
PASSWORD: ${{ secrets.MCPASSWORD }}
run: |
touch password.txt
echo $env:USERNAME >> password.txt
echo $env:PASSWORD >> password.txt
shell: bash
- name: Run all tests with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion mcserverwrapper/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def connect_mineflayer(address = "127.0.0.1", port = 25565, offline_mode=False):

if not offline_mode:
with open("password.txt", "r", encoding="utf8") as f:
password = f.read().split("\n", maxsplit=1)
password = f.read().split("\n")
bot = mineflayer.createBot({
'host': address,
'port': port,
Expand Down

0 comments on commit edc00bf

Please sign in to comment.