forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support full compatibility test runs through a GitHub action (cosmos#…
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"include": [ | ||
{ | ||
"chain-binary": "simd", | ||
"chain-a-tag": "release-v5.0.x", | ||
"chain-b-tag": "release-v5.0.x", | ||
"chain-image": "ghcr.io/cosmos/ibc-go-simd", | ||
"entrypoint": "TestTransferTestSuite", | ||
"test": "TestReceiveEnabledParam" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Compatibility E2E | ||
on: | ||
workflow_dispatch: | ||
release-branch: | ||
description: 'Release branch to test' | ||
required: true | ||
type: choice | ||
options: | ||
- release/v5.0.x | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
ORG: cosmos | ||
IMAGE_NAME: ibc-go-simd | ||
RELEASE_BRANCH: '${{ inputs.release-branch }}' | ||
|
||
jobs: | ||
determine-docker-tag: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
docker-tag: ${{ steps.set-docker-tag.outputs.docker-tag }} | ||
steps: | ||
- run: | | ||
docker_tag="$(echo $RELEASE_BRANCH | sed 's/\//-/')" | ||
echo $docker_tag | ||
echo "::set-output name=docker-tag::$docker_tag" | ||
id: set-docker-tag | ||
build-release-image: | ||
runs-on: ubuntu-latest | ||
needs: determine-docker-tag | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: "${{ env.RELEASE_BRANCH }}" | ||
fetch-depth: 0 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Fetch latest Dockerfile | ||
run: curl https://raw.githubusercontent.com/cosmos/ibc-go/main/Dockerfile -o Dockerfile | ||
- name: Build image | ||
run: | | ||
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 | ||
e2e-tests: | ||
runs-on: ubuntu-latest | ||
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" |