-
Notifications
You must be signed in to change notification settings - Fork 27
64 lines (53 loc) · 2.04 KB
/
Copy pathci.yml
File metadata and controls
64 lines (53 loc) · 2.04 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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: |
# Pin forge-std to the version the suite is developed against so CI
# can't drift onto a newer forge-std that changes cheatcode/std behavior.
forge install foundry-rs/forge-std@v1.9.4 --shallow
# OZ v5.0.2 is not reachable via foundry's tag-API window (OZ is at v5.6.x).
# Pin by SHA (== the v5.0.2 release tag); --shallow excluded because
# shallow clones can't checkout arbitrary commits.
forge install OpenZeppelin/openzeppelin-contracts@dbb6104ce834628e473d2173bbc9d47f81a9eec3
# `forge build --sizes` / `forge test` auto-discover every suite under
# contracts/test + test/, so the multi-token escrow (unit ①) and swap
# adapter (unit ②) suites run here without an explicit test list.
- run: forge build --sizes
- run: forge test -vv
# Belt-and-suspenders: fail loudly if the new multi-token / swap suites
# ever stop being discovered (e.g. a bad path move), rather than silently
# shrinking coverage.
- name: Assert multi-token + swap suites are present
run: |
forge test --match-contract MultiTokenAgentEscrowTest -vv
forge test --match-contract SwapSettlementAdapterTest -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