Skip to content

Update Uniswap v3 liquidity reading tutorial. APIs have changed and U… #1402

Update Uniswap v3 liquidity reading tutorial. APIs have changed and U…

Update Uniswap v3 liquidity reading tutorial. APIs have changed and U… #1402

Workflow file for this run

name: Automated test suite
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-python:
# Reserved multicore instance for running tests
runs-on:
group: Beefy runners
# Only run the action for the latest push
# See https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
# TODO: we only need contracts/aave-v3-deploy for tests
# but there does not seem to be an option to choose which submodules to checkout
# https://github.com/actions/checkout
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: contracts/aave-v3-deploy/package-lock.json
# pnpm needed to compile Enzyme
# We need version 7 to be exact.
- name: Install pnpm
run: |
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=7.27.1 sh -
PNPM_HOME="/home/runner/.local/share/pnpm"
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
echo $PNPM_HOME >> $GITHUB_PATH
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
poetry env use '3.12'
poetry install --all-extras
- name: Install Ganache
run: yarn global add ganache
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
# pick a nightly release from: https://github.com/foundry-rs/foundry/releases
version: 'nightly-de33b6af53005037b463318d2628b5cfcaf39916'
# We also work around race condition for setting up Aave NPM packages.
- name: Setup Aave v3 for tests
run: |
poetry run install-aave-for-testing
# We also work around race condition for setting up Aave NPM packages.
- name: Build needed contracts
run: |
pnpm --version
make guard in-house
# Run tests parallel.
- name: Run test scripts
run: |
poetry run pytest --tb=native -n auto
env:
BNB_CHAIN_JSON_RPC: ${{ secrets.BNB_CHAIN_JSON_RPC }}
JSON_RPC_POLYGON_ARCHIVE: ${{ secrets.JSON_RPC_POLYGON_ARCHIVE }}
JSON_RPC_POLYGON: ${{ secrets.JSON_RPC_POLYGON }}
JSON_RPC_ETHEREUM: ${{ secrets.JSON_RPC_ETHEREUM }}
ETHEREUM_JSON_RPC: ${{ secrets.JSON_RPC_ETHEREUM }}
# Disabled for now
# https://github.com/reviewdog/action-flake8/issues/40
# - name: Run flake8
# uses: reviewdog/action-flake8@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}