diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 644b9ce6..f0cb85e8 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -39,17 +39,16 @@ jobs: - name: Install dependencies run: | - pip install -r requirements-dev.txt - pip install -r requirements.txt + pip install -r requirements.txt -r requirements-dev.txt - name: Setup brownie networks run: | - brownie networks modify mainnet host=${{ secrets[WEB3_PROVIDER] }} + brownie networks modify mainnet host=${{ secrets.WEB3_PROVIDER }} continue-on-error: true - name: Run test suite env: - BROWNIE_NETWORK: mainnet + PYTEST_NETWORK: mainnet + ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }} run: pytest - continue-on-error: true \ No newline at end of file diff --git a/tests/test_brownie_patch.py b/tests/test_brownie_patch.py index baa6ea44..c985d713 100644 --- a/tests/test_brownie_patch.py +++ b/tests/test_brownie_patch.py @@ -7,28 +7,31 @@ from tests.fixtures import dank_w3 - def test_patch_call(): - weth = Contract('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2') + # must use from_explorer for gh testing workflow + weth = Contract.from_explorer('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2') _patch_call(weth.totalSupply, dank_w3) assert hasattr(weth.totalSupply, 'coroutine') assert await_awaitable(weth.totalSupply.coroutine(block_identifier=13_000_000)) == 6620041514474872981393155 # TODO implement this test once _patch_tx is implemented #def test_patch_tx(): -# uni_v3_quoter = Contract('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6') + # must use from_explorer for gh testing workflow +# uni_v3_quoter = Contract.from_explorer('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6') # _patch_tx(uni_v3_quoter.quoteExactInput, dank_w3) # assert hasattr(uni_v3_quoter.quoteExactInput, 'coroutine') # assert await_awaitable(uni_v3_quoter.quoteExactInput.coroutine(block_identifier=13_000_000)) == 0 def test_patch_contract(): # ContractCall - weth = patch_contract(Contract('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'), dank_w3) + # must use from_explorer for gh testing workflow + weth = patch_contract(Contract.from_explorer('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'), dank_w3) assert hasattr(weth.totalSupply, 'coroutine') assert await_awaitable(weth.totalSupply.coroutine(block_identifier=13_000_000)) == 6620041514474872981393155 # ContractTx # TODO implement this part of the test once _patch_tx is implemented - #uni_v3_quoter = patch_contract(Contract('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6'), dank_w3) + # must use from_explorer for gh testing workflow + #uni_v3_quoter = patch_contract(Contract.from_explorer('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6'), dank_w3) #assert hasattr(uni_v3_quoter.quoteExactInput, 'coroutine') #assert await_awaitable(uni_v3_quoter.quoteExactInput.coroutine(block_identifier=13_000_000)) == 0