Skip to content

Commit a9c810e

Browse files
authored
setup ci (#14)
1 parent 232ff9b commit a9c810e

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/test.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
project:
18+
- repo: "OpenZeppelin/openzeppelin-contracts"
19+
dir: "openzeppelin-contracts"
20+
submodule: "lib/erc4626-tests"
21+
cmd: "forge test --mc ERC4626StdTest"
22+
- repo: "morpho-org/metamorpho"
23+
dir: "metamorpho"
24+
submodule: "lib/erc4626-tests"
25+
cmd: "forge test --mc ERC4626ComplianceTest"
26+
- repo: "yearn/tokenized-strategy"
27+
dir: "tokenized-strategy"
28+
submodule: "lib/erc4626-tests"
29+
cmd: "forge test --mc ERC4626StdTest"
30+
- repo: "pcaversaccio/snekmate"
31+
dir: "snekmate"
32+
submodule: "lib/erc4626-tests"
33+
cmd: "forge test --mc ERC4626VaultTest"
34+
- repo: "aave-dao/aave-umbrella"
35+
dir: "aave-umbrella"
36+
submodule: "lib/erc4626-tests"
37+
cmd: "forge test --mc ERC4626StdTest"
38+
39+
steps:
40+
- name: Checkout current repository
41+
uses: actions/checkout@v4
42+
with:
43+
path: erc4626-tests
44+
45+
- name: Checkout external project
46+
uses: actions/checkout@v4
47+
with:
48+
repository: ${{ matrix.project.repo }}
49+
path: ${{ matrix.project.dir }}
50+
submodules: recursive
51+
52+
- name: Replace submodule with current repository
53+
working-directory: ${{ matrix.project.dir }}
54+
run: |
55+
rm -rf ${{ matrix.project.submodule }}
56+
cp -r ${{ github.workspace }}/erc4626-tests ${{ matrix.project.submodule }}
57+
58+
- name: Install Foundry
59+
uses: foundry-rs/foundry-toolchain@v1
60+
61+
- name: Install Vyper
62+
run: pip install git+https://github.com/vyperlang/vyper.git@master
63+
64+
- name: Run tests
65+
working-directory: ${{ matrix.project.dir }}
66+
run: |
67+
${{ matrix.project.cmd }}

0 commit comments

Comments
 (0)