Skip to content

Commit 1dec926

Browse files
committed
workflows: increase num of tranches to 16
Keep the SQL, etcd, bitcoin rpcpolling builds and non-ubuntu builds at 8 since they are less stable.
1 parent 31b6696 commit 1dec926

File tree

1 file changed

+83
-21
lines changed

1 file changed

+83
-21
lines changed

.github/workflows/main.yml

Lines changed: 83 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ defaults:
2323
env:
2424
BITCOIN_VERSION: "28"
2525

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
2734

2835
# If you change this please also update GO_VERSION in Makefile (then run
2936
# `make lint` to see where else it needs to be updated as well).
@@ -262,10 +269,10 @@ jobs:
262269

263270

264271
########################
265-
# run ubuntu integration tests
272+
# run integration tests with TRANCHES
266273
########################
267-
ubuntu-integration-test:
268-
name: run ubuntu itests
274+
basic-integration-test:
275+
name: basic itests
269276
runs-on: ubuntu-latest
270277
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
271278
strategy:
@@ -279,18 +286,6 @@ jobs:
279286
args: backend=bitcoind cover=1
280287
- name: bitcoind-notxindex
281288
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
294289
- name: neutrino
295290
args: backend=neutrino cover=1
296291
steps:
@@ -339,12 +334,79 @@ jobs:
339334
path: logs-itest-${{ matrix.name }}.zip
340335
retention-days: 5
341336

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+
342404

343405
########################
344406
# run windows integration test
345407
########################
346408
windows-integration-test:
347-
name: run windows itest
409+
name: windows itest
348410
runs-on: windows-latest
349411
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
350412
steps:
@@ -364,7 +426,7 @@ jobs:
364426
key-prefix: integration-test
365427

366428
- name: run itest
367-
run: make itest-parallel tranches=${{ env.TRANCHES }} windows=1 shuffleseed=${{ github.run_id }}
429+
run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} windows=1 shuffleseed=${{ github.run_id }}
368430

369431
- name: kill any remaining lnd processes
370432
if: ${{ failure() }}
@@ -388,7 +450,7 @@ jobs:
388450
# run macOS integration test
389451
########################
390452
macos-integration-test:
391-
name: run macOS itest
453+
name: macOS itest
392454
runs-on: macos-14
393455
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
394456
steps:
@@ -408,7 +470,7 @@ jobs:
408470
key-prefix: integration-test
409471

410472
- name: run itest
411-
run: make itest-parallel tranches=${{ env.TRANCHES }} shuffleseed=${{ github.run_id }}
473+
run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} shuffleseed=${{ github.run_id }}
412474

413475
- name: Zip log files on failure
414476
if: ${{ failure() }}
@@ -467,7 +529,7 @@ jobs:
467529
# Notify about the completion of all coverage collecting jobs.
468530
finish:
469531
if: ${{ always() }}
470-
needs: [unit-test, ubuntu-integration-test]
532+
needs: [unit-test, basic-integration-test]
471533
runs-on: ubuntu-latest
472534
steps:
473535
- uses: ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c

0 commit comments

Comments
 (0)