-
Notifications
You must be signed in to change notification settings - Fork 5
170 lines (138 loc) · 4.35 KB
/
verify.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Verify
on:
workflow_call:
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Lint code
run: bun format && bun lint:fix
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: 'chore: format'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
build:
name: Build
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build
run: bun run build
types:
name: Types
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
typescript-version: ['5.0.4']
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- run: bun i -d typescript@${{ matrix.typescript-version }}
- name: Build contracts
shell: bash
run: bun run contracts:build
- name: Check types
run: bun run typecheck
- name: Test types
run: bun run test:typecheck
env:
VITE_ANVIL_BLOCK_NUMBER: ${{ vars.VITE_ANVIL_BLOCK_NUMBER }}
test:
name: Test
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
transport-mode: ['http', 'webSocket']
shard: [1, 2, 3]
total-shards: [3]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build contracts
shell: bash
run: bun run contracts:build
- name: Run tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: bun run test:ci --shard=${{ matrix.shard }}/${{ matrix.total-shards }}
env:
VITE_ANVIL_BLOCK_NUMBER: ${{ vars.VITE_ANVIL_BLOCK_NUMBER }}
VITE_ANVIL_BLOCK_TIME: ${{ vars.VITE_ANVIL_BLOCK_TIME }}
VITE_ANVIL_FORK_URL: ${{ secrets.VITE_ANVIL_FORK_URL }}
VITE_BATCH_MULTICALL: ${{ matrix.multicall }}
VITE_NETWORK_TRANSPORT_MODE: ${{ matrix.transport-mode }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
vectors:
name: Vectors
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Run test vectors
shell: bash
run: bun run vectors
suave-examples:
name: Suave Examples
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Check out suave-geth
uses: actions/checkout@v3
with:
repository: flashbots/suave-geth
path: suave-geth-clone
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run dev env
working-directory: suave-geth-clone
run: docker compose -f ./suave/e2e/docker-compose.yml up -d --build
- name: Install JS dependencies
uses: ./.github/actions/install-dependencies
- name: Build suave-viem
run: bun run build
- name: Install suave contract dependencies
shell: bash
working-directory: examples/suave/contracts
run: forge install
- name: Install suave example dependencies
working-directory: examples/suave
run: bun install
- name: Run example
working-directory: examples/suave
shell: bash
run: |
./deployContracts.sh
export PRIVATE_KEY=0x91ab9a7e53c220e6210460b65a7a3bb2ca181412a8a7b43ff336b3df1737ce12
export SUAVE_RPC_URL_HTTP=http://0.0.0.0:8545
export L1_RPC_URL_HTTP=http://0.0.0.0:8555
export L1_CHAIN_ID=1337
bun run index.ts