99
99
cache : true
100
100
- name : Set Test Matrix
101
101
id : set-test-matrix
102
- run : go run utils/test_matrix/test_matrix.go admin cmd consensus engine fvm ledger module network/test network/p2p utils
102
+ run : go run utils/test_matrix/test_matrix.go admin cmd consensus engine/access engine/collection engine/common engine/consensus engine/execution/ingestion:buildjet-8vcpu-ubuntu-2204 engine/execution/computation engine/execution engine/verification engine:buildjet-4vcpu-ubuntu-2204 fvm ledger module/dkg module:buildjet-4vcpu-ubuntu-2204 network/alsp network/ test/cohort1:buildjet-16vcpu-ubuntu-2204 network/test/cohort2:buildjet-4vcpu-ubuntu-2204 network/ p2p/connection network/p2p/p2pnode:buildjet-4vcpu-ubuntu-2204 network/p2p/scoring network/p2p network state storage utils
103
103
104
104
unit-test :
105
105
name : Unit Tests (${{ matrix.targets.name }})
@@ -108,8 +108,8 @@ jobs:
108
108
fail-fast : false
109
109
matrix :
110
110
targets : ${{ fromJSON(needs.create-dynamic-test-matrix.outputs.dynamic-matrix)}}
111
- # need to set image explicitly due to GitHub logging issue as described in https://github.com/onflow/flow-go/pull/3087#issuecomment-1234383202
112
- runs-on : ubuntu-20.04
111
+ # # need to set image explicitly due to GitHub logging issue as described in https://github.com/onflow/flow-go/pull/3087#issuecomment-1234383202
112
+ runs-on : ${{ matrix.targets.runner }}
113
113
steps :
114
114
- name : Checkout repo
115
115
uses : actions/checkout@v3
@@ -123,8 +123,8 @@ jobs:
123
123
- name : Run tests (${{ matrix.targets.name }})
124
124
uses : nick-fields/retry@v2
125
125
with :
126
- timeout_minutes : 25
127
- max_attempts : 3
126
+ timeout_minutes : 35
127
+ max_attempts : 5
128
128
command : VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" test
129
129
130
130
# TODO(rbtz): re-enable when we fix exisiting races.
@@ -148,17 +148,20 @@ jobs:
148
148
make2 : unittest
149
149
retries : 1
150
150
race : 1
151
+ runner : ubuntu-latest
151
152
- name : insecure
152
153
make1 : install-tools
153
154
make2 : test
154
- retries : 3
155
+ retries : 5
155
156
race : 0
157
+ runner : buildjet-4vcpu-ubuntu-2204
156
158
- name : integration
157
159
make1 : install-tools
158
160
make2 : test
159
- retries : 3
161
+ retries : 5
160
162
race : 0
161
- runs-on : ubuntu-latest
163
+ runner : buildjet-4vcpu-ubuntu-2204
164
+ runs-on : ${{ matrix.runner }}
162
165
steps :
163
166
- name : Checkout repo
164
167
uses : actions/checkout@v3
@@ -174,7 +177,7 @@ jobs:
174
177
RACE_DETECTOR : ${{ matrix.race }}
175
178
uses : nick-fields/retry@v2
176
179
with :
177
- timeout_minutes : 25
180
+ timeout_minutes : 35
178
181
max_attempts : ${{ matrix.retries }}
179
182
# run `make2` target inside each module's root
180
183
command : VERBOSE=1 make -C ${{ matrix.name }} ${{ matrix.make2 }}
@@ -185,27 +188,101 @@ jobs:
185
188
flags : unittests
186
189
name : codecov-umbrella
187
190
191
+ docker-build :
192
+ name : Docker Build
193
+ runs-on : buildjet-16vcpu-ubuntu-2204
194
+ steps :
195
+ - name : Checkout repo
196
+ uses : actions/checkout@v3
197
+ with :
198
+ # all tags are needed for integration tests
199
+ fetch-depth : 0
200
+ - name : Setup Go
201
+ uses : actions/setup-go@v3
202
+ with :
203
+ go-version : ${{ env.GO_VERSION }}
204
+ cache : true
205
+ - name : Build relic
206
+ run : make crypto_setup_gopath
207
+ - name : Docker build
208
+ run : make docker-build-flow docker-build-flow-corrupt
209
+ - name : Save Docker images
210
+ run : |
211
+ docker save \
212
+ gcr.io/flow-container-registry/access:latest \
213
+ gcr.io/flow-container-registry/collection:latest \
214
+ gcr.io/flow-container-registry/consensus:latest \
215
+ gcr.io/flow-container-registry/execution:latest \
216
+ gcr.io/flow-container-registry/ghost:latest \
217
+ gcr.io/flow-container-registry/observer:latest \
218
+ gcr.io/flow-container-registry/verification:latest \
219
+ gcr.io/flow-container-registry/access-corrupted:latest \
220
+ gcr.io/flow-container-registry/execution-corrupted:latest \
221
+ gcr.io/flow-container-registry/verification-corrupted:latest > flow-docker-images.tar
222
+ - name : Cache Docker images
223
+ uses : actions/cache@v3
224
+ with :
225
+ path : flow-docker-images.tar
226
+ # use the workflow run id as part of the cache key to ensure these docker images will only be used for a single workflow run
227
+ key : flow-docker-images-${{ hashFiles('**/Dockerfile') }}-${{ github.run_id }}
228
+
188
229
integration-test :
189
230
name : Integration Tests
231
+ needs : docker-build
190
232
strategy :
191
233
fail-fast : false
192
234
matrix :
193
- make :
194
- - make -C integration access-tests
195
- - make -C integration bft-framework-tests
196
- - make -C integration bft-protocol-tests
197
- - make -C integration bft-gossipsub-tests
198
- - make -C integration collection-tests
199
- - make -C integration consensus-tests
200
- - make -C integration epochs-cohort1-tests
201
- - make -C integration epochs-cohort2-tests
202
- - make -C integration execution-tests
203
- - make -C integration ghost-tests
204
- - make -C integration mvp-tests
205
- - make -C integration network-tests
206
- - make -C integration verification-tests
207
- - make -C integration upgrades-tests
208
- runs-on : ubuntu-latest
235
+ include :
236
+ - name : Access Cohort1 Integration Tests
237
+ make : make -C integration access-cohort1-tests
238
+ runner : buildjet-4vcpu-ubuntu-2204
239
+ - name : Access Cohort2 Integration Tests
240
+ make : make -C integration access-cohort2-tests
241
+ runner : ubuntu-latest
242
+ - name : Access Cohort3 Integration Tests
243
+ make : make -C integration access-cohort3-tests
244
+ runner : ubuntu-latest
245
+ # test suite has single test which is flaky and needs to be fixed - reminder here to put it back when it's fixed
246
+ # - name: BFT (Framework) Integration Tests
247
+ # make: make -C integration bft-framework-tests
248
+ # runner: ubuntu-latest
249
+ - name : BFT (Protocol) Integration Tests
250
+ make : make -C integration bft-protocol-tests
251
+ runner : buildjet-8vcpu-ubuntu-2204
252
+ - name : BFT (Gossipsub) Integration Tests
253
+ make : make -C integration bft-gossipsub-tests
254
+ runner : ubuntu-latest
255
+ - name : Collection Integration Tests
256
+ make : make -C integration collection-tests
257
+ runner : ubuntu-latest
258
+ - name : Consensus Integration Tests
259
+ make : make -C integration consensus-tests
260
+ runner : ubuntu-latest
261
+ - name : Epoch Cohort1 Integration Tests
262
+ make : make -C integration epochs-cohort1-tests
263
+ runner : buildjet-8vcpu-ubuntu-2204
264
+ - name : Epoch Cohort2 Integration Tests
265
+ make : make -C integration epochs-cohort2-tests
266
+ runner : buildjet-4vcpu-ubuntu-2204
267
+ - name : Execution Integration Tests
268
+ make : make -C integration execution-tests
269
+ runner : ubuntu-latest
270
+ - name : Ghost Integration Tests
271
+ make : make -C integration ghost-tests
272
+ runner : ubuntu-latest
273
+ - name : MVP Integration Tests
274
+ make : make -C integration mvp-tests
275
+ runner : ubuntu-latest
276
+ - name : Network Integration Tests
277
+ make : make -C integration network-tests
278
+ runner : ubuntu-latest
279
+ - name : Verification Integration Tests
280
+ make : make -C integration verification-tests
281
+ runner : ubuntu-latest
282
+ - name : Upgrade Integration Tests
283
+ make : make -C integration upgrades-tests
284
+ runner : ubuntu-latest
285
+ runs-on : ${{ matrix.runner }}
209
286
steps :
210
287
- name : Checkout repo
211
288
uses : actions/checkout@v3
@@ -219,51 +296,20 @@ jobs:
219
296
cache : true
220
297
- name : Build relic
221
298
run : make crypto_setup_gopath
222
- - name : Docker build
223
- run : make docker-build-flow docker-build-flow-corrupt
224
- - name : Run tests
299
+ - name : Load cached Docker images
300
+ uses : actions/cache@v3
301
+ with :
302
+ path : flow-docker-images.tar
303
+ # use the same cache key as the docker-build job
304
+ key : flow-docker-images-${{ hashFiles('**/Dockerfile') }}-${{ github.run_id }}
305
+ - name : Load Docker images
306
+ run : docker load -i flow-docker-images.tar
307
+ - name : Run tests (${{ matrix.name }})
225
308
# TODO(rbtz): re-enable when we fix exisiting races.
226
309
# env:
227
310
# RACE_DETECTOR: 1
228
311
uses : nick-fields/retry@v2
229
312
with :
230
- timeout_minutes : 25
231
- max_attempts : 3
313
+ timeout_minutes : 35
314
+ max_attempts : 5
232
315
command : VERBOSE=1 ${{ matrix.make }}
233
-
234
- localnet-test :
235
- name : Localnet Compatibility Tests With Flow-CLI Client and Observer
236
- strategy :
237
- fail-fast : false
238
- runs-on : ubuntu-latest
239
- steps :
240
- - name : Checkout repo
241
- uses : actions/checkout@v3
242
- - name : Setup Go
243
- uses : actions/setup-go@v3
244
- with :
245
- go-version : ${{ env.GO_VERSION }}
246
- cache : true
247
- - name : Build relic and other tools
248
- run : make install-tools
249
- - name : Install Flow Client In Docker
250
- # This proved to be more reliable than installing it locally.
251
- run : cd integration/localnet && sh client/client.sh
252
- - name : Set up Localnet
253
- run : bash -c 'cd integration/localnet/ && make -e OBSERVER=2 bootstrap && make start-flow'
254
- - name : Ensure Observer is started
255
- run : docker ps -f name=localnet-observer_1-1 | grep localnet-observer
256
- - name : Get Client Version ensuring the client is provisioned
257
- run : docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer version
258
- - name : Wait for a default waiting period until a clean state
259
- # This will not cause flakiness.
260
- # The waiting time is a reasonable time to expect an observer to be responsive
261
- run : sleep 10
262
- - name : Get Status ensuring the access endpoint is online
263
- run : docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access status
264
- - name : Wait for finalized blocks and check them
265
- run : docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
266
- - name : Wait for finalized blocks and check them with Observer
267
- run : sleep 5 && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access blocks get latest && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
268
- - name : Stop localnet
269
- run : bash -c 'cd integration/localnet/ && make stop'
0 commit comments