Unstable blockchain chain tip fixes for Ankr #878
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated test suite | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test-python: | |
runs-on: ubuntu-latest | |
# 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 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: | | |
poetry env use '3.10' | |
poetry install -E data | |
- name: Install Ganache | |
run: yarn global add ganache | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: 'nightly-e15e33a07c0920189fc336391f538c3dad53da73' | |
# - name: Workaround aave-v3-deploy npm ci failing randomly on Github | |
# run: | | |
# cd contracts/aave-v3-deploy | |
# npm ci | |
- name: Run test scripts | |
run: | | |
poetry run pytest --tb=native | |
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 }} | |
# 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 }} |