-
Notifications
You must be signed in to change notification settings - Fork 31
50 lines (40 loc) · 1.23 KB
/
Copy pathci.yml
File metadata and controls
50 lines (40 loc) · 1.23 KB
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
name: CI
on:
push:
branches: [master, main]
pull_request:
jobs:
forge:
name: forge test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Install OZ + forge-std
run: |
forge install foundry-rs/forge-std --shallow
# OZ v5.0.2 is not reachable via foundry's tag-API window (OZ is at v5.6.x).
# Pin by SHA; --shallow excluded because shallow clones can't checkout arbitrary commits.
forge install OpenZeppelin/openzeppelin-contracts@dbb6104ce834628e473d2173bbc9d47f81a9eec3
- run: forge build --sizes
- run: forge test -vv
pytest:
name: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package + test deps
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev,flask,fastapi]'
- name: Collect tests (must succeed)
run: pytest tests/ --collect-only -q
- name: Run tests
run: pytest tests/ -v