From 3e7bde959d54280c9d49fbdd03d9736f3a67f5d9 Mon Sep 17 00:00:00 2001 From: George Date: Tue, 3 Mar 2026 13:32:38 -0800 Subject: [PATCH 1/6] Add GHA to invoke RPC integration tests on commits to master --- .github/workflows/rpc-integration.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/rpc-integration.yml diff --git a/.github/workflows/rpc-integration.yml b/.github/workflows/rpc-integration.yml new file mode 100644 index 0000000000..b14a88fef4 --- /dev/null +++ b/.github/workflows/rpc-integration.yml @@ -0,0 +1,12 @@ +name: RPC Integration Tests + +on: + push: + branches: + - master + +jobs: + rpc-integration: + uses: stellar/stellar-rpc/.github/workflows/stellar-rpc.yml@main + with: + core_git_ref: ${{ github.sha }} From dee235ab23ebf5af58e3f055216fb388f5ec69c6 Mon Sep 17 00:00:00 2001 From: George Date: Tue, 3 Mar 2026 13:35:54 -0800 Subject: [PATCH 2/6] Add runs on pull request to test in CI --- .github/workflows/rpc-integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rpc-integration.yml b/.github/workflows/rpc-integration.yml index b14a88fef4..6cf9df9244 100644 --- a/.github/workflows/rpc-integration.yml +++ b/.github/workflows/rpc-integration.yml @@ -1,6 +1,7 @@ name: RPC Integration Tests on: + pull_request: push: branches: - master From b2d35b809c8299ba661eee750bba750ae5d480b9 Mon Sep 17 00:00:00 2001 From: George Date: Tue, 3 Mar 2026 13:36:57 -0800 Subject: [PATCH 3/6] Add golang setup actions for RPC tests --- .github/actions/setup-go/action.yml | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/actions/setup-go/action.yml diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml new file mode 100644 index 0000000000..d4048e53a3 --- /dev/null +++ b/.github/actions/setup-go/action.yml @@ -0,0 +1,55 @@ +name: 'Setup the Go environment' +description: 'Installs go and restores/saves the build/module cache' +runs: + using: "composite" + steps: + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: '1.24' + # unfortunately we cannot use the provided caching because it uses the + # same cache for all workflows/jobs, leading to undesired cache clashes, + # causing uncached test runs etc ... + # You can see the cache key at https://github.com/actions/setup-go/blob/4e0b6c77c6448caafaff5eed51516cad78e7639a/src/cache-restore.ts#L34 + # There is a ticket to add prefixes for the cache, which should solve it https://github.com/actions/setup-go/issues/358 + cache: false + + # Restore original modification time of files based on the date of the most + # recent commit that modified them as mtimes affect the Go test cache. + # See https://github.com/golang/go/issues/58571 for details + - name: Restore modification time of checkout files + uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe + + + # KEY_PREFIX must uniquely identify the specific instance of a job executing. + - shell: bash + run: | + echo 'KEY_PREFIX=${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{ inputs.go-version }}-matrix(${{ join(matrix.*,'|') }})' >> $GITHUB_OUTPUT + echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT + echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT + if [ ${{ runner.os }} != 'Windows' ]; then echo SUDO='sudo' >> $GITHUB_OUTPUT; fi + id: variables + + # Cache the Go Modules downloaded during the job. + - uses: actions/cache@v4 + with: + path: ${{ steps.variables.outputs.GOMODCACHE }} + key: ${{ steps.variables.outputs.KEY_PREFIX }}-go-mod-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ steps.variables.outputs.KEY_PREFIX }}-go-mod- + + # Cache any build and test artifacts during the job, which will speed up + # rebuilds and cause test runs to skip tests that have no reason to rerun. + - uses: actions/cache@v4 + with: + path: ${{ steps.variables.outputs.GOCACHE }} + key: ${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }} + restore-keys: | + ${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}- + ${{ steps.variables.outputs.KEY_PREFIX }}-go-build- + + # Reset the cache for master/protected branches, to ensure they build and run the tests from zero + # and that the module cache is cleaned (otherwise it accumulates orphan dependencies over time). + - if: github.ref_protected + shell: bash + run: ${{ steps.variables.outputs.SUDO }} rm -rf ${{ steps.variables.outputs.GOMODCACHE }} ${{ steps.variables.outputs.GOCACHE }} + From b8429509dc531942e26be5de08d2f9674607e768 Mon Sep 17 00:00:00 2001 From: George Date: Tue, 3 Mar 2026 13:48:32 -0800 Subject: [PATCH 4/6] Add concurrency check and use modified workflow --- .github/workflows/rpc-integration.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rpc-integration.yml b/.github/workflows/rpc-integration.yml index 6cf9df9244..5e2c5176aa 100644 --- a/.github/workflows/rpc-integration.yml +++ b/.github/workflows/rpc-integration.yml @@ -6,8 +6,12 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: - rpc-integration: - uses: stellar/stellar-rpc/.github/workflows/stellar-rpc.yml@main + rpc: + uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@03dc7760be9380d046f46aacada382554fbe50a2 with: core_git_ref: ${{ github.sha }} From 25d2c18e255fd990c0fbf1f18b4525eca63a25aa Mon Sep 17 00:00:00 2001 From: George Date: Tue, 3 Mar 2026 15:22:06 -0800 Subject: [PATCH 5/6] Bump to latest workflow version --- .github/workflows/{rpc-integration.yml => rpc.yml} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{rpc-integration.yml => rpc.yml} (75%) diff --git a/.github/workflows/rpc-integration.yml b/.github/workflows/rpc.yml similarity index 75% rename from .github/workflows/rpc-integration.yml rename to .github/workflows/rpc.yml index 5e2c5176aa..dceeb6fa61 100644 --- a/.github/workflows/rpc-integration.yml +++ b/.github/workflows/rpc.yml @@ -12,6 +12,8 @@ concurrency: jobs: rpc: - uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@03dc7760be9380d046f46aacada382554fbe50a2 + name: RPC integration tests + uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@123a559ae044eb5791ba3405db3573d285c384c6 with: core_git_ref: ${{ github.sha }} + protocol_version: '25' From ec04e614e08ed1b4bf29be75afa1c2d8aed35246 Mon Sep 17 00:00:00 2001 From: George Date: Fri, 6 Mar 2026 14:26:03 -0800 Subject: [PATCH 6/6] Use latest integration test workflow --- .github/workflows/rpc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rpc.yml b/.github/workflows/rpc.yml index dceeb6fa61..5bf5e519ac 100644 --- a/.github/workflows/rpc.yml +++ b/.github/workflows/rpc.yml @@ -13,7 +13,7 @@ concurrency: jobs: rpc: name: RPC integration tests - uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@123a559ae044eb5791ba3405db3573d285c384c6 + uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@main with: core_git_ref: ${{ github.sha }} protocol_version: '25'