Skip to content

Commit c3fefc7

Browse files
authored
[eth] Add CI for Foundry tests (#394)
* [eth]: Add eth contract ci (foundry) * Update the ci * Fix ci * Add paths
1 parent d6e25d9 commit c3fefc7

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- ethereum/**
5+
- third_party/pyth/xc-governance-sdk-js/**
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- ethereum/**
11+
- third_party/pyth/xc-governance-sdk-js/**
12+
13+
name: Ethereum Contract
14+
15+
jobs:
16+
check:
17+
name: Foundry tests
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: ethereum/
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Install XC-governance sdk dependencies
26+
run: npm ci
27+
working-directory: third_party/pyth/xc-governance-sdk-js
28+
29+
- name: Install contract npm dependencies
30+
run: npm ci
31+
32+
- name: Install Foundry
33+
uses: foundry-rs/foundry-toolchain@v1
34+
with:
35+
version: nightly
36+
37+
- name: Install Forge dependencies
38+
run: npm run install-forge-deps
39+
40+
- name: Run tests
41+
run: forge test -vvv
42+
43+
- name: Run snapshot
44+
run: NO_COLOR=1 forge snapshot --match-contract GasBenchmark >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)