-
Notifications
You must be signed in to change notification settings - Fork 51
70 lines (55 loc) · 1.9 KB
/
main.yaml
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
68
69
70
name: unitary
on: ["push", "pull_request"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
unitary:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
name: "unit tests: python ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Requirements
run: |
pip install -r dev-requirements.txt
pip install .
- name: Run Unit Tests
run: pytest -n auto tests/unitary/
integration:
name: "integration tests (forked and networked modes)"
runs-on: ubuntu-latest
# only run in single process, so there is no contention for sepolia tx nonce
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: Install Requirements
run: |
pip install -r dev-requirements.txt
pip install .
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# XXX: are these actually unit tests?
- name: Run Fork Mode Tests
run: pytest -n auto tests/integration/fork/
env:
MAINNET_ENDPOINT: ${{ secrets.ALCHEMY_MAINNET_ENDPOINT }}
- name: Run Networked Tests against anvil
# run separately to clarify its dependency on outside binary
run: pytest -n auto tests/integration/network/anvil/
- name: Run Sepolia Tests
# disable xdist, otherwise they can contend for tx nonce
run: pytest -n 0 tests/integration/network/sepolia/
env:
SEPOLIA_ENDPOINT: ${{ secrets.ALCHEMY_SEPOLIA_ENDPOINT }}
SEPOLIA_PKEY: ${{ secrets.SEPOLIA_PKEY }}