Skip to content

Commit

Permalink
Add compatibility tests for v5.0.x #2 (#2396)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Sep 28, 2022
1 parent c582e8a commit 0d63964
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 54 deletions.
12 changes: 0 additions & 12 deletions .github/compatibility-test-matrices/release-v5.0.x.json

This file was deleted.

10 changes: 10 additions & 0 deletions .github/compatibility-test-matrices/release-v5.0.x/client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"chain-a": ["release-v5.0.x", "v4.1.0", "v3.3.0", "v2.4.0"],
"chain-b": ["release-v5.0.x", "v4.1.0", "v3.3.0", "v2.4.0"],
"entrypoint": ["TestClientTestSuite"],
"test": [
"TestClientUpdateProposal_Succeeds"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"chain-a": ["release-v5.0.x", "v4.1.0"],
"chain-b": ["release-v5.0.x", "v4.1.0"],
"entrypoint": ["TestIncentivizedTransferTestSuite"],
"test": [
"TestMsgPayPacketFee_AsyncSingleSender_Succeeds",
"TestMsgPayPacketFee_InvalidReceiverAccount",
"TestMultiMsg_MsgPayPacketFeeSingleSender",
"TestMsgPayPacketFee_SingleSender_TimesOut",
"TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress",
"TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
14 changes: 14 additions & 0 deletions .github/compatibility-test-matrices/release-v5.0.x/transfer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"chain-a": ["release-v5.0.x", "v4.1.0", "v3.3.0", "v2.4.0"],
"chain-b": ["release-v5.0.x", "v4.1.0", "v3.3.0", "v2.4.0"],
"entrypoint": ["TestTransferTestSuite"],
"test": [
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
50 changes: 50 additions & 0 deletions .github/workflows/e2e-compatibility-workflow-call.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
workflow_call:
inputs:
docker-tag:
description: 'Docker tag being used'
required: true
type: string
test-suite:
description: 'Test suite to run'
required: true
type: string


jobs:
load-test-matrix:
outputs:
test-matrix: ${{ steps.set-test-matrix.outputs.test-matrix }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
# use jq -c to put the full json contents on a single line. This is required when using the json body
# to create the matrix in the following job.
test_matrix="$(cat .github/compatibility-test-matrices/${{ inputs.docker-tag }}/${{ inputs.test-suite }}.json | jq -c)"
echo $test_matrix
echo "::set-output name=test-matrix::$test_matrix"
id: set-test-matrix
e2e:
runs-on: ubuntu-latest
needs: load-test-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.load-test-matrix.outputs.test-matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run e2e Test
run: |
cd e2e
make e2e-test entrypoint=${{ matrix.entrypoint }} test=${{ matrix.test }}
env:
# each test has its own set of variables to specify which images are used.
CHAIN_IMAGE: "${{ matrix.chain-image }}"
CHAIN_A_TAG: "${{ matrix.chain-a }}"
CHAIN_B_TAG: "${{ matrix.chain-b }}"
CHAIN_BINARY: "${{ matrix.chain-binary }}"
RLY_TAG: "v2.0.0"
72 changes: 30 additions & 42 deletions .github/workflows/e2e-compatibility.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Compatibility E2E
on:
workflow_dispatch:
release-branch:
description: 'Release branch to test'
required: true
type: choice
options:
- release/v5.0.x
inputs:
release-branch:
description: 'Release branch to test'
required: true
type: choice
options:
- release/v5.0.x

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -47,42 +48,29 @@ jobs:
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${{ needs.determine-docker-tag.outputs.docker-tag }}"
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${{ needs.determine-docker-tag.outputs.docker-tag }}"
load-test-matrix:
outputs:
test-matrix: ${{ steps.set-test-matrix.outputs.test-matrix }}
needs: determine-docker-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
# use jq -c to put the full json contents on a single line. This is required when using the json body
# to create the matrix in the following job.
test_matrix="$(cat .github/compatibility-test-matrices/${{ needs.determine-docker-tag.outputs.docker-tag }}.json | jq -c)"
echo $test_matrix
echo "::set-output name=test-matrix::$test_matrix"
id: set-test-matrix
transfer:
needs:
- build-release-image
- determine-docker-tag
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-suite: "transfer"

e2e-tests:
runs-on: ubuntu-latest
client:
needs:
- load-test-matrix
- build-release-image
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.load-test-matrix.outputs.test-matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run e2e Test
run: |
cd e2e
make e2e-test entrypoint=${{ matrix.entrypoint }} test=${{ matrix.test }}
env:
# each test has its own set of variables to specify which images are used.
CHAIN_IMAGE: "${{ matrix.chain-image }}"
CHAIN_A_TAG: "${{ matrix.chain-a-tag }}"
CHAIN_B_TAG: "${{ matrix.chain-b-tag }}"
CHAIN_BINARY: "${{ matrix.chain-binary }}"
RLY_TAG: "v2.0.0"
- determine-docker-tag
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-suite: "client"

incentivized-transfer:
needs:
- build-release-image
- determine-docker-tag
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-suite: "incentivized-transfer"

0 comments on commit 0d63964

Please sign in to comment.