From 0883f60d21864f34a388e65269c0430c2066f33a Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Sun, 12 Oct 2025 22:41:11 +1000 Subject: [PATCH 01/20] add continue-on-error flag to test configuration --- .github/workflows/build.yml | 11 +++++----- .scripts/images-additional-tests | 4 +++- README.md | 5 ++++- images.json | 35 +++++++++++++++++++++++--------- 4 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5877efa72..df41f05ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -316,15 +316,16 @@ jobs: if: always() && !failure() && !cancelled() && (github.event_name != 'workflow_call' || inputs.test == true) strategy: matrix: - tag: ${{ fromJSON(needs.setup.outputs.images).*.tag }} + image: ${{ fromJSON(needs.setup.outputs.images) }} arch: ${{ fromJSON(inputs.archs) }} network: ["local"] enable: ["core","rpc","core,rpc,horizon"] options: [""] include: ${{ fromJSON(needs.setup.outputs.additional-tests) }} fail-fast: false - name: 6 test (${{ matrix.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}) + name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}) runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + continue-on-error: ${{ matrix.image.tests.continue-on-error }} steps: - name: Free up disk space if: matrix.network == 'pubnet' @@ -341,7 +342,7 @@ jobs: - name: Download Quickstart Image uses: actions/download-artifact@v4 with: - name: image-quickstart-${{ matrix.tag }}-${{ matrix.arch }}.tar + name: image-quickstart-${{ matrix.image.tag }}-${{ matrix.arch }}.tar path: /tmp/ - name: Load Quickstart Image run: docker load -i /tmp/image @@ -356,7 +357,7 @@ jobs: "8000:8000" -p "11626:11626" --name stellar - quickstart:${{ matrix.tag }}-${{ matrix.arch }} + quickstart:${{ matrix.image.tag }}-${{ matrix.arch }} --${{ matrix.network }} --enable ${{ matrix.enable }} ${{ matrix.options }} @@ -421,6 +422,6 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: logs-${{ matrix.tag }}-${{ matrix.arch }}-test-${{ strategy.job-index }} + name: logs-${{ matrix.image.tag }}-${{ matrix.arch }}-test-${{ strategy.job-index }} path: logs retention-days: ${{ env.artifact_retention_days_for_logs }} diff --git a/.scripts/images-additional-tests b/.scripts/images-additional-tests index eabfd80a3..4f1c4ef49 100755 --- a/.scripts/images-additional-tests +++ b/.scripts/images-additional-tests @@ -11,7 +11,9 @@ images = json.load(sys.stdin) tests = [] for image in images: tag = image['tag'] - for test in image['additional-tests']: + for test in image.get('additional-tests', []): + tests.append({'tag': tag, **test}) + for test in image.get('tests', {}).get('additional-tests', []): tests.append({'tag': tag, **test}) print(json.dumps(tests)) diff --git a/README.md b/README.md index 065c0f858..c2f0235aa 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,10 @@ jobs: { "name": "friendbot", "repo": "stellar/go", "ref": "horizon-v23.0.0" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [] + "tests": { + "continue-on-error": false, + "additional-tests": [] + } } ] archs: '["amd64"]' diff --git a/images.json b/images.json index 616ff5410..2f777901e 100644 --- a/images.json +++ b/images.json @@ -13,9 +13,12 @@ { "name": "friendbot", "repo": "stellar/go", "ref": "horizon-v23.0.0" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [ - { "arch": "amd64", "network": "pubnet", "enable": "core,rpc,horizon" } - ] + "tests": { + "continue-on-error": false, + "additional-tests": [ + { "arch": "amd64", "network": "pubnet", "enable": "core,rpc,horizon" } + ] + } }, { "tag": "testing", @@ -31,10 +34,13 @@ { "name": "friendbot", "repo": "stellar/go", "ref": "horizon-v23.0.0" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [ - { "arch": "amd64", "network": "testnet", "enable": "core,rpc,horizon" }, - { "arch": "amd64", "network": "pubnet", "enable": "core,rpc,horizon" } - ] + "tests": { + "continue-on-error": false, + "additional-tests": [ + { "arch": "amd64", "network": "testnet", "enable": "core,rpc,horizon" }, + { "arch": "amd64", "network": "pubnet", "enable": "core,rpc,horizon" } + ] + } }, { "tag": "future", @@ -50,7 +56,10 @@ { "name": "friendbot", "repo": "stellar/go", "ref": "horizon-v23.0.0" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [] + "tests": { + "continue-on-error": false, + "additional-tests": [] + } }, { "tag": "nightly", @@ -66,7 +75,10 @@ { "name": "friendbot", "repo": "stellar/go", "ref": "master" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [] + "tests": { + "continue-on-error": true, + "additional-tests": [] + } }, { "tag": "nightly-next", @@ -82,6 +94,9 @@ { "name": "friendbot", "repo": "stellar/go", "ref": "master" }, { "name": "lab", "repo": "stellar/laboratory", "ref": "main" } ], - "additional-tests": [] + "tests": { + "continue-on-error": true, + "additional-tests": [] + } } ] From c1d700518d91e93dd69a6ce3e1970da9fcf72e34 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Sun, 12 Oct 2025 23:36:40 +1000 Subject: [PATCH 02/20] add pull_request event to nightly-next image temporarily --- images.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images.json b/images.json index 2f777901e..b84035965 100644 --- a/images.json +++ b/images.json @@ -82,7 +82,7 @@ }, { "tag": "nightly-next", - "events": ["push", "schedule"], + "events": ["push", "schedule", "pull_request"], "config": { "protocol_version_default": 24 }, From 6786acf2cc3e1eb8579f0888632577fcd37e7241 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Sun, 12 Oct 2025 23:54:19 +1000 Subject: [PATCH 03/20] add default false to continue-on-error config --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df41f05ef..a9ff615fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -325,7 +325,7 @@ jobs: fail-fast: false name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}) runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} - continue-on-error: ${{ matrix.image.tests.continue-on-error }} + continue-on-error: ${{ matrix.image.tests.continue-on-error || 'false' }} steps: - name: Free up disk space if: matrix.network == 'pubnet' From 2f2a94e516930422ab595f57a5425e658045d121 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:08:44 +1000 Subject: [PATCH 04/20] remove quotes from continue-on-error default value --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9ff615fa..f8ffdb195 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -325,7 +325,7 @@ jobs: fail-fast: false name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}) runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} - continue-on-error: ${{ matrix.image.tests.continue-on-error || 'false' }} + continue-on-error: ${{ matrix.image.tests.continue-on-error || false }} steps: - name: Free up disk space if: matrix.network == 'pubnet' From f9440e4bcf0fc78e3850de644c747a731dd19ec3 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:26:30 +1000 Subject: [PATCH 05/20] nest tag under image key in test objects --- .scripts/images-additional-tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/images-additional-tests b/.scripts/images-additional-tests index 4f1c4ef49..69f7d92c3 100755 --- a/.scripts/images-additional-tests +++ b/.scripts/images-additional-tests @@ -12,8 +12,8 @@ tests = [] for image in images: tag = image['tag'] for test in image.get('additional-tests', []): - tests.append({'tag': tag, **test}) + tests.append({'image': {'tag': tag}, **test}) for test in image.get('tests', {}).get('additional-tests', []): - tests.append({'tag': tag, **test}) + tests.append({'image': {'tag': tag}, **test}) print(json.dumps(tests)) From 0a0a3a6cf74a8f937ac14feda5251f48355429d5 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:27:32 +1000 Subject: [PATCH 06/20] pass full image object to additional tests --- .scripts/images-additional-tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/images-additional-tests b/.scripts/images-additional-tests index 69f7d92c3..e34ede5b1 100755 --- a/.scripts/images-additional-tests +++ b/.scripts/images-additional-tests @@ -12,8 +12,8 @@ tests = [] for image in images: tag = image['tag'] for test in image.get('additional-tests', []): - tests.append({'image': {'tag': tag}, **test}) + tests.append({'image': image, **test}) for test in image.get('tests', {}).get('additional-tests', []): - tests.append({'image': {'tag': tag}, **test}) + tests.append({'image': image, **test}) print(json.dumps(tests)) From 94b2bd70bdb9be75c608b99c6573554be235b213 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 06:23:30 +1000 Subject: [PATCH 07/20] move test timeouts from Go code to workflow --- .github/workflows/build.yml | 7 +++++++ tests/test_core.go | 9 --------- tests/test_friendbot.go | 9 --------- tests/test_horizon_core_up.go | 9 --------- tests/test_horizon_ingesting.go | 9 --------- tests/test_horizon_up.go | 9 --------- tests/test_stellar_rpc_healthy.go | 9 --------- tests/test_stellar_rpc_up.go | 9 --------- 8 files changed, 7 insertions(+), 63 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8ffdb195..8c7cfdf28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -369,6 +369,7 @@ jobs: run: sleep 10 - name: Run core test if: ${{ contains(matrix.enable, 'core') }} + timeout-minutes: 2 run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -376,6 +377,7 @@ jobs: curl http://localhost:11626/info - name: Run horizon up test if: ${{ contains(matrix.enable, 'horizon') }} + timeout-minutes: 1 run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -383,6 +385,7 @@ jobs: curl http://localhost:8000 - name: Run horizon core up test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} + timeout-minutes: 2 run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -390,6 +393,7 @@ jobs: curl http://localhost:8000 - name: Run horizon ingesting test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} + timeout-minutes: 1 run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -398,6 +402,7 @@ jobs: curl http://localhost:8000 - name: Run friendbot test if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} + timeout-minutes: 1 run: | docker logs stellar -f & echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & @@ -405,12 +410,14 @@ jobs: go run tests/test_friendbot.go - name: Run stellar rpc up test if: ${{ contains(matrix.enable, 'rpc') }} + timeout-minutes: 1 run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & go run tests/test_stellar_rpc_up.go - name: Run stellar rpc healthy test if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} + timeout-minutes: 1 run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & diff --git a/tests/test_core.go b/tests/test_core.go index 396bf57ed..4bc909e33 100644 --- a/tests/test_core.go +++ b/tests/test_core.go @@ -8,8 +8,6 @@ import ( "time" ) -const timeout = 3 * time.Minute - type Info struct { Info struct { State string `json:"state"` @@ -17,17 +15,10 @@ type Info struct { } func main() { - startTime := time.Now() - for { time.Sleep(5 * time.Second) logLine("Waiting for stellar-core to start catching up and sync") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Get("http://localhost:11626/info") if err != nil { logLine(err) diff --git a/tests/test_friendbot.go b/tests/test_friendbot.go index 42bc7f70b..7452c1c05 100644 --- a/tests/test_friendbot.go +++ b/tests/test_friendbot.go @@ -8,20 +8,11 @@ import ( "time" ) -const timeout = 10 * time.Minute - func main() { - startTime := time.Now() - for { time.Sleep(10 * time.Second) logLine("Waiting for Friendbot to be available") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - params := url.Values{} params.Set("addr", "GDDVAW5VBBMSKIGNHCZIRZ3BCDQXKO7TCPGEPJR4KL72RHAL2R2ETEST") resp, err := http.Get("http://localhost:8000/friendbot?" + params.Encode()) diff --git a/tests/test_horizon_core_up.go b/tests/test_horizon_core_up.go index dd0e7f8fa..197a7d78e 100644 --- a/tests/test_horizon_core_up.go +++ b/tests/test_horizon_core_up.go @@ -8,24 +8,15 @@ import ( "time" ) -const timeout = 20 * time.Minute - type Root struct { CoreSupportedProtocolVersion int32 `json:"core_supported_protocol_version"` } func main() { - startTime := time.Now() - for { time.Sleep(5 * time.Second) logLine("Waiting for Horizon's stellar-core to start reporting") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Get("http://localhost:8000") if err != nil { logLine(err) diff --git a/tests/test_horizon_ingesting.go b/tests/test_horizon_ingesting.go index db0695033..7404a3e66 100644 --- a/tests/test_horizon_ingesting.go +++ b/tests/test_horizon_ingesting.go @@ -8,25 +8,16 @@ import ( "time" ) -const timeout = 2 * time.Hour - type Root struct { HorizonSequence int32 `json:"history_latest_ledger"` CoreSequence int32 `json:"core_latest_ledger"` } func main() { - startTime := time.Now() - for { time.Sleep(10 * time.Second) logLine("Waiting for Horizon to start ingesting") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Get("http://localhost:8000") if err != nil { logLine(err) diff --git a/tests/test_horizon_up.go b/tests/test_horizon_up.go index b908c9d2a..d1dfa62dc 100644 --- a/tests/test_horizon_up.go +++ b/tests/test_horizon_up.go @@ -8,24 +8,15 @@ import ( "time" ) -const timeout = 3 * time.Minute - type Root struct { SupportedProtocolVersion int32 `json:"supported_protocol_version"` } func main() { - startTime := time.Now() - for { time.Sleep(5 * time.Second) logLine("Waiting for Horizon to start") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Get("http://localhost:8000") if err != nil { logLine(err) diff --git a/tests/test_stellar_rpc_healthy.go b/tests/test_stellar_rpc_healthy.go index 7ac98517a..e87d84580 100644 --- a/tests/test_stellar_rpc_healthy.go +++ b/tests/test_stellar_rpc_healthy.go @@ -10,8 +10,6 @@ import ( "time" ) -const timeout = 12 * time.Minute - type RPCResponse struct { Result struct { Status string `json:"status"` @@ -22,8 +20,6 @@ type RPCResponse struct { } func main() { - startTime := time.Now() - getHealthRPCRequest := []byte(`{ "jsonrpc": "2.0", "id": 10235, @@ -34,11 +30,6 @@ func main() { time.Sleep(5 * time.Second) logLine("Waiting for Stellar RPC to start") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Post("http://localhost:8000/rpc", "application/json", bytes.NewBuffer(getHealthRPCRequest)) if err != nil { logLine(err) diff --git a/tests/test_stellar_rpc_up.go b/tests/test_stellar_rpc_up.go index 6f62cc785..040bb1909 100644 --- a/tests/test_stellar_rpc_up.go +++ b/tests/test_stellar_rpc_up.go @@ -10,8 +10,6 @@ import ( "time" ) -const timeout = 6 * time.Minute - type RPCResponse struct { Result struct { Status string `json:"status"` @@ -22,8 +20,6 @@ type RPCResponse struct { } func main() { - startTime := time.Now() - getHealthRPCRequest := []byte(`{ "jsonrpc": "2.0", "id": 10235, @@ -34,11 +30,6 @@ func main() { time.Sleep(5 * time.Second) logLine("Waiting for Stellar RPC to start") - if time.Since(startTime) > timeout { - logLine("Timeout") - os.Exit(-1) - } - resp, err := http.Post("http://localhost:8000/rpc", "application/json", bytes.NewBuffer(getHealthRPCRequest)) if err != nil { logLine(err) From ea9cf29e21ecbc8036376db61d007408790b5722 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 06:53:59 +1000 Subject: [PATCH 08/20] add continue-on-error flag to test job name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c7cfdf28..985f679ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -323,7 +323,7 @@ jobs: options: [""] include: ${{ fromJSON(needs.setup.outputs.additional-tests) }} fail-fast: false - name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}) + name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error'}}) runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} continue-on-error: ${{ matrix.image.tests.continue-on-error || false }} steps: From 92fb28fe2aab78ed532f8cbe7e30bd6afdf99f72 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 06:59:03 +1000 Subject: [PATCH 09/20] remove pull_request event from nightly-next --- images.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images.json b/images.json index b84035965..2f777901e 100644 --- a/images.json +++ b/images.json @@ -82,7 +82,7 @@ }, { "tag": "nightly-next", - "events": ["push", "schedule", "pull_request"], + "events": ["push", "schedule"], "config": { "protocol_version_default": 24 }, From 74cb9048346873356802f10c9688337492347fa7 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:01:55 +1000 Subject: [PATCH 10/20] make test timeouts dynamic based on run number --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 985f679ce..e0db5955f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -369,7 +369,7 @@ jobs: run: sleep 10 - name: Run core test if: ${{ contains(matrix.enable, 'core') }} - timeout-minutes: 2 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -377,7 +377,7 @@ jobs: curl http://localhost:11626/info - name: Run horizon up test if: ${{ contains(matrix.enable, 'horizon') }} - timeout-minutes: 1 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -385,7 +385,7 @@ jobs: curl http://localhost:8000 - name: Run horizon core up test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: 2 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -393,7 +393,7 @@ jobs: curl http://localhost:8000 - name: Run horizon ingesting test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: 1 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -402,7 +402,7 @@ jobs: curl http://localhost:8000 - name: Run friendbot test if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} - timeout-minutes: 1 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & @@ -410,14 +410,14 @@ jobs: go run tests/test_friendbot.go - name: Run stellar rpc up test if: ${{ contains(matrix.enable, 'rpc') }} - timeout-minutes: 1 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & go run tests/test_stellar_rpc_up.go - name: Run stellar rpc healthy test if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} - timeout-minutes: 1 + timeout-minutes: ${{ 2 * github.run_number }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & From 2e13a8592a4d6e87d1e4ae27ae7f2cc5b144ca23 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:04:35 +1000 Subject: [PATCH 11/20] extract timeout calculation to reusable step --- .github/workflows/build.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0db5955f..bfa527b0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -367,9 +367,12 @@ jobs: go-version: ^1 - name: Sleep until supervisor is up run: sleep 10 + - name: Calculate timeout + id: timeout + run: echo "minutes=$((${{ github.run_number }} * 2))" >> $GITHUB_OUTPUT - name: Run core test if: ${{ contains(matrix.enable, 'core') }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -377,7 +380,7 @@ jobs: curl http://localhost:11626/info - name: Run horizon up test if: ${{ contains(matrix.enable, 'horizon') }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -385,7 +388,7 @@ jobs: curl http://localhost:8000 - name: Run horizon core up test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -393,7 +396,7 @@ jobs: curl http://localhost:8000 - name: Run horizon ingesting test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -402,7 +405,7 @@ jobs: curl http://localhost:8000 - name: Run friendbot test if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & @@ -410,14 +413,14 @@ jobs: go run tests/test_friendbot.go - name: Run stellar rpc up test if: ${{ contains(matrix.enable, 'rpc') }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & go run tests/test_stellar_rpc_up.go - name: Run stellar rpc healthy test if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ 2 * github.run_number }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & From 57e579d00cfb10f4e6b757fb8dcd8d0ade79fa86 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:19:54 +1000 Subject: [PATCH 12/20] push before test in local ci --- .github/workflows/build.yml | 136 ++------------------------- .github/workflows/ci.yml | 22 ++++- .github/workflows/test.yml | 181 ++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+), 131 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfa527b0e..b427150ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,12 +94,6 @@ jobs: deps="$(<<< $images ./.scripts/images-deps)" <<< $deps jq echo "deps=$deps" >> $GITHUB_OUTPUT - - name: Additional Tests - id: tests - run: | - tests="$(<<< $images ./.scripts/images-additional-tests)" - <<< $tests jq - echo "additional-tests=$tests" >> $GITHUB_OUTPUT load: needs: [setup] @@ -312,126 +306,12 @@ jobs: retention-days: ${{ env.artifact_retention_days_for_image }} test: + if: inputs.test + name: 6 test needs: [setup, build] - if: always() && !failure() && !cancelled() && (github.event_name != 'workflow_call' || inputs.test == true) - strategy: - matrix: - image: ${{ fromJSON(needs.setup.outputs.images) }} - arch: ${{ fromJSON(inputs.archs) }} - network: ["local"] - enable: ["core","rpc","core,rpc,horizon"] - options: [""] - include: ${{ fromJSON(needs.setup.outputs.additional-tests) }} - fail-fast: false - name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error'}}) - runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} - continue-on-error: ${{ matrix.image.tests.continue-on-error || false }} - steps: - - name: Free up disk space - if: matrix.network == 'pubnet' - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - df -h - - uses: actions/checkout@v2 - with: - repository: ${{ inputs.repo }} - ref: ${{ needs.setup.outputs.sha }} - - name: Download Quickstart Image - uses: actions/download-artifact@v4 - with: - name: image-quickstart-${{ matrix.image.tag }}-${{ matrix.arch }}.tar - path: /tmp/ - - name: Load Quickstart Image - run: docker load -i /tmp/image - - name: Prepare Logs Directory - run: mkdir -p logs - - name: Run Quickstart Image - run: > - docker run - --platform linux/${{ matrix.arch }} - -d - -p - "8000:8000" - -p "11626:11626" - --name stellar - quickstart:${{ matrix.image.tag }}-${{ matrix.arch }} - --${{ matrix.network }} - --enable ${{ matrix.enable }} - ${{ matrix.options }} - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ^1 - - name: Sleep until supervisor is up - run: sleep 10 - - name: Calculate timeout - id: timeout - run: echo "minutes=$((${{ github.run_number }} * 2))" >> $GITHUB_OUTPUT - - name: Run core test - if: ${{ contains(matrix.enable, 'core') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & - go run tests/test_core.go - curl http://localhost:11626/info - - name: Run horizon up test - if: ${{ contains(matrix.enable, 'horizon') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & - go run tests/test_horizon_up.go - curl http://localhost:8000 - - name: Run horizon core up test - if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & - go run tests/test_horizon_core_up.go - curl http://localhost:8000 - - name: Run horizon ingesting test - if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & - echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & - go run tests/test_horizon_ingesting.go - curl http://localhost:8000 - - name: Run friendbot test - if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & - echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & - go run tests/test_friendbot.go - - name: Run stellar rpc up test - if: ${{ contains(matrix.enable, 'rpc') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & - go run tests/test_stellar_rpc_up.go - - name: Run stellar rpc healthy test - if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} - run: | - docker logs stellar -f & - echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & - go run tests/test_stellar_rpc_healthy.go - - name: Prepare Test Logs - if: always() - run: docker cp stellar:/var/log logs - - name: Upload Test Logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: logs-${{ matrix.image.tag }}-${{ matrix.arch }}-test-${{ strategy.job-index }} - path: logs - retention-days: ${{ env.artifact_retention_days_for_logs }} + uses: ./.github/workflows/test.yml + with: + repo: ${{ inputs.repo }} + ref: ${{ needs.setup.outputs.sha }} + images: ${{ inputs.images }} + archs: ${{ inputs.archs }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 460553bbd..112d0e1b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: name: 1 setup runs-on: ubuntu-latest outputs: + sha: ${{ steps.sha.outputs.sha }} tag-prefix: ${{ steps.tag-prefix.outputs.tag-prefix }} tag-alias-prefix: ${{ steps.tag-prefix.outputs.tag-alias-prefix }} images: ${{ steps.images.outputs.images }} @@ -54,6 +55,10 @@ jobs: with: fetch-depth: 0 # Get all history for the sha count below. ref: ${{ github.event.pull_request.head.sha || github.sha }} + - name: Sha + id: sha + run: | + echo "sha=$(git rev-parse HEAD)" | tee -a $GITHUB_OUTPUT - name: Tag Prefix id: tag-prefix run: | @@ -88,9 +93,10 @@ jobs: needs: setup uses: ./.github/workflows/build.yml with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} + ref: ${{ needs.setup.outputs.sha }} images: ${{ needs.setup.outputs.images }} archs: ${{ needs.setup.outputs.archs }} + test: false # do not run tests as part of build, run tests separately after push action-using-artifact: needs: [setup, build] @@ -105,7 +111,7 @@ jobs: needs: [setup, build] uses: ./.github/workflows/push.yml with: - sha: ${{ github.event.pull_request.head.sha || github.sha }} + sha: ${{ needs.setup.outputs.sha }} tags: ${{ needs.setup.outputs.tags }} archs: ${{ needs.setup.outputs.archs }} tag-prefix: ${{ needs.setup.outputs.tag-prefix }} @@ -116,9 +122,19 @@ jobs: registry_username: ${{ secrets.DOCKERHUB_USERNAME || github.actor }} registry_password: ${{ secrets.DOCKERHUB_TOKEN || github.token }} + test: + name: 5 test + needs: [setup, build] + uses: ./.github/workflows/test.yml + with: + repo: ${{ inputs.repo }} + ref: ${{ needs.setup.outputs.sha }} + images: ${{ inputs.images }} + archs: ${{ inputs.archs }} + action-using-registry: needs: [setup, push] - name: 5 test action registry + name: 6 test action registry uses: ./.github/workflows/action-test.yml with: tag: ${{ needs.setup.outputs.tag-prefix }}${{ fromJSON(needs.setup.outputs.tags)[0] }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..4ad7ade4b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,181 @@ +name: Test + +# This workflow tests multiple quickstart images that have been built with the +# build.yml. This workflow and the build.yml workflow are coupled, and this +# workflow makes assumptions about what artifact names the images hae been +# saved under. This workflow is not intended to be called by third parties. + +on: + workflow_call: + inputs: + repo: + description: "Quickstart repo where quickstart is hosted" + type: "string" + default: "stellar/quickstart" + ref: + description: "Quickstart ref to load tests from (sha, branch, tag)" + type: "string" + default: "main" + images: + description: "A custom image.json (a single image from the same format as images.json), if not provided the full images.json is run" + type: "string" + required: true + archs: + description: 'Architectures to build for as an array (e.g. ["amd64", "arm64"])' + type: "string" + required: true + +env: + artifact_retention_days_for_logs: 60 + +jobs: + + complete: + if: always() + name: complete + needs: [setup, test] + runs-on: ubuntu-latest + steps: + - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 + + setup: + name: 1 setup + runs-on: ubuntu-latest + outputs: + additional-tests: ${{ steps.tests.outputs.additional-tests }} + steps: + - uses: actions/checkout@v2 + with: + repository: ${{ inputs.repo }} + ref: ${{ inputs.ref }} + - name: Additional Tests + id: tests + run: | + tests="$(<<< $images ./.scripts/images-additional-tests)" + <<< $tests jq + echo "additional-tests=$tests" >> $GITHUB_OUTPUT + + test: + needs: [setup, build] + strategy: + matrix: + image: ${{ fromJSON(inputs.images) }} + arch: ${{ fromJSON(inputs.archs) }} + network: ["local"] + enable: ["core","rpc","core,rpc,horizon"] + options: [""] + include: ${{ fromJSON(needs.setup.outputs.additional-tests) }} + fail-fast: false + name: 2 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error'}}) + runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + continue-on-error: ${{ matrix.image.tests.continue-on-error || false }} + steps: + - name: Free up disk space + if: matrix.network == 'pubnet' + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + df -h + - uses: actions/checkout@v2 + with: + repository: ${{ inputs.repo }} + ref: ${{ needs.setup.outputs.sha }} + - name: Download Quickstart Image + uses: actions/download-artifact@v4 + with: + name: image-quickstart-${{ matrix.image.tag }}-${{ matrix.arch }}.tar + path: /tmp/ + - name: Load Quickstart Image + run: docker load -i /tmp/image + - name: Prepare Logs Directory + run: mkdir -p logs + - name: Run Quickstart Image + run: > + docker run + --platform linux/${{ matrix.arch }} + -d + -p + "8000:8000" + -p "11626:11626" + --name stellar + quickstart:${{ matrix.image.tag }}-${{ matrix.arch }} + --${{ matrix.network }} + --enable ${{ matrix.enable }} + ${{ matrix.options }} + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1 + - name: Sleep until supervisor is up + run: sleep 10 + - name: Calculate timeout + id: timeout + run: echo "minutes=$((${{ github.run_number }} * 2))" >> $GITHUB_OUTPUT + - name: Run core test + if: ${{ contains(matrix.enable, 'core') }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & + go run tests/test_core.go + curl http://localhost:11626/info + - name: Run horizon up test + if: ${{ contains(matrix.enable, 'horizon') }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & + go run tests/test_horizon_up.go + curl http://localhost:8000 + - name: Run horizon core up test + if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & + go run tests/test_horizon_core_up.go + curl http://localhost:8000 + - name: Run horizon ingesting test + if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & + echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & + go run tests/test_horizon_ingesting.go + curl http://localhost:8000 + - name: Run friendbot test + if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & + echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & + go run tests/test_friendbot.go + - name: Run stellar rpc up test + if: ${{ contains(matrix.enable, 'rpc') }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & + go run tests/test_stellar_rpc_up.go + - name: Run stellar rpc healthy test + if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} + timeout-minutes: ${{ steps.timeout.outputs.minutes }} + run: | + docker logs stellar -f & + echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & + go run tests/test_stellar_rpc_healthy.go + - name: Prepare Test Logs + if: always() + run: docker cp stellar:/var/log logs + - name: Upload Test Logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.image.tag }}-${{ matrix.arch }}-test-${{ strategy.job-index }} + path: logs + retention-days: ${{ env.artifact_retention_days_for_logs }} From 101382dced3d46ed8bdb8bfdce43db4300e1b174 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:28:39 +1000 Subject: [PATCH 13/20] run tests in parallel with push instead of after --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 112d0e1b5..f9db2ac15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,18 +96,28 @@ jobs: ref: ${{ needs.setup.outputs.sha }} images: ${{ needs.setup.outputs.images }} archs: ${{ needs.setup.outputs.archs }} - test: false # do not run tests as part of build, run tests separately after push + test: false # do not run tests as part of build, tests run in parallel with push + + test: + name: 3 test + needs: [setup, build] + uses: ./.github/workflows/test.yml + with: + repo: ${{ inputs.repo }} + ref: ${{ needs.setup.outputs.sha }} + images: ${{ inputs.images }} + archs: ${{ inputs.archs }} action-using-artifact: needs: [setup, build] - name: 3 test action artifact + name: 4 test action artifact uses: ./.github/workflows/action-test.yml with: artifact: image-quickstart-${{ fromJSON(needs.setup.outputs.tags)[0] }}-${{ fromJSON(needs.setup.outputs.archs)[0] }}.tar tag: ${{ fromJSON(needs.setup.outputs.tags)[0] }}-${{ fromJSON(needs.setup.outputs.archs)[0] }} push: - name: 4 push + name: 5 push needs: [setup, build] uses: ./.github/workflows/push.yml with: @@ -122,16 +132,6 @@ jobs: registry_username: ${{ secrets.DOCKERHUB_USERNAME || github.actor }} registry_password: ${{ secrets.DOCKERHUB_TOKEN || github.token }} - test: - name: 5 test - needs: [setup, build] - uses: ./.github/workflows/test.yml - with: - repo: ${{ inputs.repo }} - ref: ${{ needs.setup.outputs.sha }} - images: ${{ inputs.images }} - archs: ${{ inputs.archs }} - action-using-registry: needs: [setup, push] name: 6 test action registry From 5d1472767724054d66750f58b94fa6f3d5a8a625 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:29:43 +1000 Subject: [PATCH 14/20] remove build dependency from test job --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ad7ade4b..c37fa1c54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: echo "additional-tests=$tests" >> $GITHUB_OUTPUT test: - needs: [setup, build] + needs: setup strategy: matrix: image: ${{ fromJSON(inputs.images) }} From 2cea7e7040e252bee407a8b508c2990550df8840 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:30:55 +1000 Subject: [PATCH 15/20] add test job to complete job dependencies --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9db2ac15..a2c88ef1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: complete: if: always() name: complete - needs: [build, action-using-artifact, push, action-using-registry] + needs: [build, test, action-using-artifact, push, action-using-registry] runs-on: ubuntu-latest steps: - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') From 4fee3ed0d6bf0815f706026493623350e8aa8ca3 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:41:24 +1000 Subject: [PATCH 16/20] add images env var to additional tests step --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c37fa1c54..9689659c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,8 @@ jobs: ref: ${{ inputs.ref }} - name: Additional Tests id: tests + env: + images: ${{ inputs.images }} run: | tests="$(<<< $images ./.scripts/images-additional-tests)" <<< $tests jq From ba498932bcbe20b2a432817296ce97dac1e7425f Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 08:19:27 +1000 Subject: [PATCH 17/20] use setup outputs instead of workflow inputs for test --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2c88ef1f..de2462230 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,10 +103,9 @@ jobs: needs: [setup, build] uses: ./.github/workflows/test.yml with: - repo: ${{ inputs.repo }} ref: ${{ needs.setup.outputs.sha }} - images: ${{ inputs.images }} - archs: ${{ inputs.archs }} + images: ${{ needs.setup.outputs.images }} + archs: ${{ needs.setup.outputs.archs }} action-using-artifact: needs: [setup, build] From ec0e5c14716b8abaab2d0b8797f08482622781db Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:15:31 +1000 Subject: [PATCH 18/20] use run_attempt and parse timeout as JSON --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfa527b0e..867752928 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -369,10 +369,10 @@ jobs: run: sleep 10 - name: Calculate timeout id: timeout - run: echo "minutes=$((${{ github.run_number }} * 2))" >> $GITHUB_OUTPUT + run: echo "minutes=$((${{ github.run_attempt }} * 2))" >> $GITHUB_OUTPUT - name: Run core test if: ${{ contains(matrix.enable, 'core') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -380,7 +380,7 @@ jobs: curl http://localhost:11626/info - name: Run horizon up test if: ${{ contains(matrix.enable, 'horizon') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -388,7 +388,7 @@ jobs: curl http://localhost:8000 - name: Run horizon core up test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & @@ -396,7 +396,7 @@ jobs: curl http://localhost:8000 - name: Run horizon ingesting test if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & @@ -405,7 +405,7 @@ jobs: curl http://localhost:8000 - name: Run friendbot test if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & @@ -413,14 +413,14 @@ jobs: go run tests/test_friendbot.go - name: Run stellar rpc up test if: ${{ contains(matrix.enable, 'rpc') }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & go run tests/test_stellar_rpc_up.go - name: Run stellar rpc healthy test if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }} - timeout-minutes: ${{ steps.timeout.outputs.minutes }} + timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }} run: | docker logs stellar -f & echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & From 2d9c5e41fed38da892b5cd47899b01f186a7c89e Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:27:38 +1000 Subject: [PATCH 19/20] add fallback for continue-on-error display value --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 867752928..31b27cda7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -323,7 +323,7 @@ jobs: options: [""] include: ${{ fromJSON(needs.setup.outputs.additional-tests) }} fail-fast: false - name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error'}}) + name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error' || ''}}) runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} continue-on-error: ${{ matrix.image.tests.continue-on-error || false }} steps: From 56c23f56a13330058b081ad30217949f0b293a15 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 13 Oct 2025 11:32:07 +1000 Subject: [PATCH 20/20] remove artifact retention days for logs env var --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b427150ae..287dad302 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,6 @@ on: env: artifact_retention_days_for_image: 7 - artifact_retention_days_for_logs: 60 jobs: