Skip to content

Commit 362dbc5

Browse files
authored
Run the RPC and Horizon integration tests at core's next protocol (#5477)
The RPC and Horizon integration tests build core with next enabled, so derive their protocol from `MAX_SUPPORTED_PROTOCOL_VERSION + 1` instead of hardcoding it (the hardcoded RPC `'27'` is failing). Horizon's stellar-rpc tests are skipped since no released RPC image supports the next protocol; Horizon caps the tested protocol at its own max.
2 parents a1f4383 + 97951ff commit 362dbc5

2 files changed

Lines changed: 46 additions & 6 deletions

File tree

‎.github/workflows/horizon.yml‎

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,32 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
horizon:
14+
# Test against core's next protocol (docker/Dockerfile.testing enables it) so
15+
# a protocol bump doesn't require updating this file. Expect failures until
16+
# the protocol-next branches support it.
17+
protocol:
1518
if: github.event.repository.visibility != 'private'
16-
uses: stellar/stellar-horizon/.github/workflows/integration-tests.yml@c9e78ebefea9721fcb0b386fc898e4c0e76cee33
19+
runs-on: ubuntu-24.04
20+
outputs:
21+
version: ${{ steps.version.outputs.version }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
sparse-checkout: src/util/ProtocolVersion.h
26+
sparse-checkout-cone-mode: false
27+
- id: version
28+
run: |
29+
version=$(sed -nE 's/.*MAX_SUPPORTED_PROTOCOL_VERSION[[:space:]]*=[[:space:]]*([0-9]+).*/\1/p' src/util/ProtocolVersion.h)
30+
test -n "$version"
31+
echo "version=$((version + 1))" >> "$GITHUB_OUTPUT"
32+
33+
horizon:
34+
needs: protocol
35+
uses: stellar/stellar-horizon/.github/workflows/integration-tests.yml@2c53fd1b5e3217ca464e3b57902aadc12af47c36
1736
with:
1837
horizon_git_ref: protocol-next
1938
core_git_ref: ${{ github.sha }}
20-
protocol_version: '28'
21-
stellar_rpc_docker_img: 'stellar/stellar-rpc:29.0.0'
39+
protocol_version: ${{ needs.protocol.outputs.version }}
40+
# Empty skips Horizon's stellar-rpc tests: no released RPC supports the
41+
# next protocol.
42+
stellar_rpc_docker_img: ''

‎.github/workflows/rpc.yml‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,29 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
rpc:
14+
# Test against core's next protocol (docker/Dockerfile.testing enables it) so
15+
# a protocol bump doesn't require updating this file. Expect failures until
16+
# the protocol-next branches support it.
17+
protocol:
1518
if: github.event.repository.visibility != 'private'
19+
runs-on: ubuntu-24.04
20+
outputs:
21+
version: ${{ steps.version.outputs.version }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
sparse-checkout: src/util/ProtocolVersion.h
26+
sparse-checkout-cone-mode: false
27+
- id: version
28+
run: |
29+
version=$(sed -nE 's/.*MAX_SUPPORTED_PROTOCOL_VERSION[[:space:]]*=[[:space:]]*([0-9]+).*/\1/p' src/util/ProtocolVersion.h)
30+
test -n "$version"
31+
echo "version=$((version + 1))" >> "$GITHUB_OUTPUT"
32+
33+
rpc:
34+
needs: protocol
1635
uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@efd9eb95f1ed8a7d69d28f12e89762c3ecb64bcc
1736
with:
1837
rpc_git_ref: protocol-next
1938
core_git_ref: ${{ github.sha }}
20-
protocol_version: '27'
39+
protocol_version: ${{ needs.protocol.outputs.version }}

0 commit comments

Comments
 (0)