ci: updated flow for new pairs and coins

api-breakage
Morty Space 4 years ago
parent 47e39f685e
commit 622d3e82ec
  1. 7
      .github/workflows/test.yml
  2. 8
      tests/test_private.py

@ -60,10 +60,7 @@ jobs:
if: matrix.python-version == '3.10'
run: poetry run pre-commit run -a
- name: Auto-generate missing pairs
if: matrix.python-version == '3.10'
run: |
. activate.sh && poetry run python generatestructs.py
poetry run python generatestructs.py
run: . activate.sh && poetry run python generatestructs.py
- name: Commit & Push changes
if: matrix.python-version == '3.10'
uses: actions-js/push@v1.3
@ -71,7 +68,7 @@ jobs:
author_email: "morty.space@gmail.com"
author_name: "Morty Space"
directory: './src'
message: "sync: Updated API pairs and coins"
message: "sync: updated API pairs and coins"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare codeclimate
if: matrix.python-version == '3.10'

@ -38,17 +38,17 @@ async def test_account_get_balance(account: cro.Account):
balances = await account.get_balance()
async with async_timeout.timeout(120):
while balances[cro.coins.CRO].available < 0.3:
while balances[cro.coins.CRO].available < 1:
await account.buy_market(cro.pairs.CRO_USDT, 0.1)
balances = await account.get_balance()
while balances[cro.coins.USDT].available < 0.3:
while balances[cro.coins.USDT].available < 1:
await account.sell_market(cro.pairs.CRO_USDT, 0.1)
balances = await account.get_balance()
balances = await account.get_balance()
local_coins = cro.coins.all()
assert balances[cro.coins.CRO].available > 0.3
assert balances[cro.coins.USDT].available > 0.3
assert balances[cro.coins.CRO].available > 1
assert balances[cro.coins.USDT].available > 1
for coin in balances:
assert coin in local_coins

Loading…
Cancel
Save