Tweak title #945
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 --all-extras | |
- name: Install Ganache | |
run: yarn global add ganache | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: 'nightly-e15e33a07c0920189fc336391f538c3dad53da73' | |
# 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 | |
# Run tests parallel. | |
# By default Github gives us only 2 CPUs, but we want to parallerise a bit more. | |
- name: Run test scripts | |
run: | | |
poetry run pytest --tb=native -n 6 --dist loadscope | |
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 }} | |
# 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 }} |