-
Notifications
You must be signed in to change notification settings - Fork 387
199 lines (183 loc) · 6.04 KB
/
ci.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: CI
on:
push:
branches:
- master
pull_request:
branches: '*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Lint
run: yarn lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: yarn build
test-solidity-utils:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-solidity-utils test
test-standalone-utils:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-standalone-utils test
test-vault:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-vault test
test-pool-utils:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-pool-utils test
test-pool-weighted:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-pool-weighted test
test-pool-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-pool-stable test
test-pool-linear:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-pool-linear test
test-asset-managers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspaces foreach --verbose --include @balancer-labs/v2-asset-manager-* run test
test-distributors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-distributors test
test-liquidity-mining:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-liquidity-mining test
test-governance-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-governance-scripts test
test-fork:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Build Balancer JS
run: yarn workspace @balancer-labs/balancer-js build
- name: Build v2-distributors
run: yarn workspace @balancer-labs/v2-distributors build
- name: Forked Network Cache
# Hardhat caches node requests when working with forked networks (e.g. when querying contract code, storage,
# etc.) to save time in future runs. We cache this directory accross runs.
# This cache action is special for a couple reasons, which originate from a) it not occupying much disk size,
# and b) the cache never being invalid (as past blockchain data is immutable). We therefore:
# - save the cache even on action failure (which may be caused due to a timeout), even if this could result in
# some wasted space. For this we use the always-upload-cache fork of the basic action.
# - use a different key on every single run, causing for the cache to always be saved.
# - use a wildcard as a restore key, which will cause all stored keys to match and the most recent one to be
# selected.
uses: pat-s/[email protected]
id: cache-forked-network
with:
path: 'pkg/deployments/cache/hardhat-network-fork/**'
key: hardhat-network-fork-${{ github.run_number }}-${{ github.run_attempt }}
restore-keys: |
hardhat-network-fork-
- name: Prepare Config
run: yarn workspace @balancer-labs/v2-deployments ci:prepare-config
env:
MAINNET_RPC_ENDPOINT: ${{ secrets.ALCHEMY_MAINNET_ARCHIVE_ENDPOINT }}
POLYGON_RPC_ENDPOINT: ${{ secrets.ALCHEMY_POLYGON_ARCHIVE_ENDPOINT }}
ARBITRUM_RPC_ENDPOINT: ${{ secrets.ALCHEMY_ARBITRUM_ARCHIVE_ENDPOINT }}
OPTIMISM_RPC_ENDPOINT: ${{ secrets.ALCHEMY_OPTIMISM_ARCHIVE_ENDPOINT }}
- name: Test
run: yarn workspace @balancer-labs/v2-deployments test
env:
CI: true