@@ -23,7 +23,14 @@ defaults:
23
23
env :
24
24
BITCOIN_VERSION : " 28"
25
25
26
- TRANCHES : 8
26
+ # TRANCHES defines the number of tranches used in the itests.
27
+ TRANCHES : 16
28
+
29
+ # SMALL_TRANCHES defines the number of tranches used in the less stable itest
30
+ # builds
31
+ #
32
+ # TODO(yy): remove this value and use TRANCHES.
33
+ SMALL_TRANCHES : 8
27
34
28
35
# If you change this please also update GO_VERSION in Makefile (then run
29
36
# `make lint` to see where else it needs to be updated as well).
@@ -262,10 +269,10 @@ jobs:
262
269
263
270
264
271
# #######################
265
- # run ubuntu integration tests
272
+ # run integration tests with TRANCHES
266
273
# #######################
267
- ubuntu -integration-test :
268
- name : run ubuntu itests
274
+ basic -integration-test :
275
+ name : basic itests
269
276
runs-on : ubuntu-latest
270
277
if : ' !contains(github.event.pull_request.labels.*.name, '' no-itest'' )'
271
278
strategy :
@@ -279,18 +286,6 @@ jobs:
279
286
args : backend=bitcoind cover=1
280
287
- name : bitcoind-notxindex
281
288
args : backend="bitcoind notxindex"
282
- - name : bitcoind-rpcpolling
283
- args : backend="bitcoind rpcpolling" cover=1
284
- - name : bitcoind-etcd
285
- args : backend=bitcoind dbbackend=etcd
286
- - name : bitcoind-postgres
287
- args : backend=bitcoind dbbackend=postgres
288
- - name : bitcoind-sqlite
289
- args : backend=bitcoind dbbackend=sqlite
290
- - name : bitcoind-postgres-nativesql
291
- args : backend=bitcoind dbbackend=postgres nativesql=true
292
- - name : bitcoind-sqlite-nativesql
293
- args : backend=bitcoind dbbackend=sqlite nativesql=true
294
289
- name : neutrino
295
290
args : backend=neutrino cover=1
296
291
steps :
@@ -316,7 +311,7 @@ jobs:
316
311
run : ./scripts/install_bitcoind.sh $BITCOIN_VERSION
317
312
318
313
- name : run ${{ matrix.name }}
319
- run : make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }}
314
+ run : make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
320
315
321
316
- name : Send coverage
322
317
if : ${{ contains(matrix.args, 'cover=1') }}
@@ -339,12 +334,79 @@ jobs:
339
334
path : logs-itest-${{ matrix.name }}.zip
340
335
retention-days : 5
341
336
337
+ # #######################
338
+ # run integration tests with SMALL_TRANCHES
339
+ # #######################
340
+ integration-test :
341
+ name : itests
342
+ runs-on : ubuntu-latest
343
+ if : ' !contains(github.event.pull_request.labels.*.name, '' no-itest'' )'
344
+ strategy :
345
+ # Allow other tests in the matrix to continue if one fails.
346
+ fail-fast : false
347
+ matrix :
348
+ include :
349
+ - name : bitcoind-rpcpolling
350
+ args : backend="bitcoind rpcpolling"
351
+ - name : bitcoind-etcd
352
+ args : backend=bitcoind dbbackend=etcd
353
+ - name : bitcoind-sqlite
354
+ args : backend=bitcoind dbbackend=sqlite
355
+ - name : bitcoind-sqlite-nativesql
356
+ args : backend=bitcoind dbbackend=sqlite nativesql=true
357
+ - name : bitcoind-postgres
358
+ args : backend=bitcoind dbbackend=postgres
359
+ - name : bitcoind-postgres-nativesql
360
+ args : backend=bitcoind dbbackend=postgres nativesql=true
361
+ steps :
362
+ - name : git checkout
363
+ uses : actions/checkout@v3
364
+ with :
365
+ fetch-depth : 0
366
+
367
+ - name : fetch and rebase on ${{ github.base_ref }}
368
+ if : github.event_name == 'pull_request'
369
+ uses : ./.github/actions/rebase
370
+
371
+ - name : setup go ${{ env.GO_VERSION }}
372
+ uses : ./.github/actions/setup-go
373
+ with :
374
+ go-version : ' ${{ env.GO_VERSION }}'
375
+ key-prefix : integration-test
376
+
377
+ - name : install bitcoind
378
+ run : ./scripts/install_bitcoind.sh $BITCOIN_VERSION
379
+
380
+ - name : run ${{ matrix.name }}
381
+ run : make itest-parallel tranches=${{ env.SMALL_TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
382
+
383
+ - name : Send coverage
384
+ if : ${{ contains(matrix.args, 'cover=1') }}
385
+ uses : shogo82148/actions-goveralls@v1
386
+ with :
387
+ path-to-profile : coverage.txt
388
+ flag-name : ' itest-${{ matrix.name }}'
389
+ parallel : true
390
+
391
+ - name : Zip log files on failure
392
+ if : ${{ failure() }}
393
+ timeout-minutes : 5 # timeout after 5 minute
394
+ run : 7z a logs-itest-${{ matrix.name }}.zip itest/**/*.log
395
+
396
+ - name : Upload log files on failure
397
+ uses : actions/upload-artifact@v3
398
+ if : ${{ failure() }}
399
+ with :
400
+ name : logs-itest-${{ matrix.name }}
401
+ path : logs-itest-${{ matrix.name }}.zip
402
+ retention-days : 5
403
+
342
404
343
405
# #######################
344
406
# run windows integration test
345
407
# #######################
346
408
windows-integration-test :
347
- name : run windows itest
409
+ name : windows itest
348
410
runs-on : windows-latest
349
411
if : ' !contains(github.event.pull_request.labels.*.name, '' no-itest'' )'
350
412
steps :
@@ -364,7 +426,7 @@ jobs:
364
426
key-prefix : integration-test
365
427
366
428
- name : run itest
367
- run : make itest-parallel tranches=${{ env.TRANCHES }} windows=1
429
+ run : make itest-parallel tranches=${{ env.SMALL_TRANCHES }} windows=1 shuffleseed=${{ github.run_id }}
368
430
369
431
- name : kill any remaining lnd processes
370
432
if : ${{ failure() }}
@@ -388,7 +450,7 @@ jobs:
388
450
# run macOS integration test
389
451
# #######################
390
452
macos-integration-test :
391
- name : run macOS itest
453
+ name : macOS itest
392
454
runs-on : macos-14
393
455
if : ' !contains(github.event.pull_request.labels.*.name, '' no-itest'' )'
394
456
steps :
@@ -407,14 +469,8 @@ jobs:
407
469
go-version : ' ${{ env.GO_VERSION }}'
408
470
key-prefix : integration-test
409
471
410
- - name : install bitcoind
411
- run : |
412
- wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}.0/bitcoin-${BITCOIN_VERSION}.0-arm64-apple-darwin.tar.gz
413
- tar zxvf bitcoin-${BITCOIN_VERSION}.0-arm64-apple-darwin.tar.gz
414
- mv bitcoin-${BITCOIN_VERSION}.0 /tmp/bitcoin
415
-
416
472
- name : run itest
417
- run : PATH=$PATH:/tmp/bitcoin/bin make itest-parallel tranches=${{ env.TRANCHES }} backend=bitcoind
473
+ run : make itest-parallel tranches=${{ env.SMALL_TRANCHES }} shuffleseed=${{ github.run_id }}
418
474
419
475
- name : Zip log files on failure
420
476
if : ${{ failure() }}
@@ -473,7 +529,7 @@ jobs:
473
529
# Notify about the completion of all coverage collecting jobs.
474
530
finish :
475
531
if : ${{ always() }}
476
- needs : [unit-test, ubuntu -integration-test]
532
+ needs : [unit-test, basic -integration-test]
477
533
runs-on : ubuntu-latest
478
534
steps :
479
535
- uses : ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c
0 commit comments