Skip to content

fix: added decode_sqrt_ratioX96 util function #340

fix: added decode_sqrt_ratioX96 util function

fix: added decode_sqrt_ratioX96 util function #340

Workflow file for this run

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Public key for PRs, plz don't abuse
PROVIDER_MAINNET: ${{ secrets.MAINNET_PROVIDER || 'https://mainnet.infura.io/v3/42ffb4f2549c4a5fa3b5d6db70f6fad1' }}
PROVIDER_ARBITRUM: 'https://rpc.ankr.com/arbitrum'
PROVIDER_XDAI: 'https://rpc.ankr.com/gnosis'
jobs:
test:
name: test (v${{ matrix.uniswap-version }}, ${{ matrix.network }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
uniswap-version: [1, 2, 3]
network: ["mainnet"]
include:
- network: arbitrum
uniswap-version: 3
#include:
# - network: xdai
# uniswap-version: 3
#include:
# - network: optimism
# uniswap-version: 3
#include:
# - network: polygon
# uniswap-version: 3
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Set up Node
uses: actions/setup-node@v2-beta
with:
node-version: '12'
# Set up poetry cache, from https://github.com/python-poetry/poetry/blob/45a9b8f20384591d0a33ae876bcf23656f928ec0/.github/workflows/main.yml
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Set up poetry
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.in-project true
poetry config installer.modern-installation false
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s poetry run pip --version || rm -rf .venv
- name: Install dependencies
run: |
poetry install
npm install -g ganache@7.5.0
- name: Test
env:
# Use the secret if available, otherwise fallback to the public key
PROVIDER: ${{ ((matrix.network == 'mainnet') && env.PROVIDER_MAINNET) || ((matrix.network == 'arbitrum') && env.PROVIDER_ARBITRUM) }}
UNISWAP_VERSION: ${{ matrix.uniswap-version }}
run: |
make test
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
typecheck:
name: typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
# Set up poetry cache, from https://github.com/python-poetry/poetry/blob/45a9b8f20384591d0a33ae876bcf23656f928ec0/.github/workflows/main.yml
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Set up poetry
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.in-project true
poetry config installer.modern-installation false
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s poetry run pip --version || rm -rf .venv
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Typecheck
run: |
make typecheck