-
Notifications
You must be signed in to change notification settings - Fork 2.2k
69 lines (57 loc) · 1.76 KB
/
protocol.yml
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
name: Protocol
on:
push:
branches: [main]
paths:
- "packages/protocol/**"
pull_request:
paths:
- "packages/protocol/**"
jobs:
build:
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
contents: write
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-2cb875799419c907cc3709e586ece2559e6b340e
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
- name: Check formatting
working-directory: ./packages/protocol
run: forge fmt --check
- name: Unit tests
working-directory: ./packages/protocol
run: pnpm clean && pnpm test
- name: Generate contract layout table
working-directory: ./packages/protocol
run: pnpm layout
- name: Commit contract layout table
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Add contract layout table"
- name: Generate genesis
working-directory: ./packages/protocol
run: pnpm test:genesis
- name: Run snapshot (Foundry)
working-directory: ./packages/protocol
run: pnpm snapshot
- name: Deploy L1 contracts
working-directory: ./packages/protocol
run: |
anvil --hardfork cancun &
while ! nc -z localhost 8545; do
sleep 1
done
pnpm test:deploy