-
Notifications
You must be signed in to change notification settings - Fork 131
67 lines (61 loc) · 2.11 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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 }}