From e0619284e50b9bdd3f72ba03567977e55e5d9a5c Mon Sep 17 00:00:00 2001 From: violet Date: Tue, 16 Jul 2024 10:48:50 -0400 Subject: [PATCH] interchain fixess --- .github/workflows/docker-push.yml | 10 ++++++++++ .github/workflows/interchain-test.yml | 10 +++++----- tests/interchain/consumer_launch_test.go | 2 +- tests/interchain/matrix_tool/main.go | 6 +++++- tests/interchain/txs_test.go | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 4bc91fcd01..0988bfad26 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -54,3 +54,13 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} if: ${{ env.NEW_COMMIT_COUNT > 0 }} + + - name: Dispatch Interchain test + uses: peter-evans/repository-dispatch@v3 + with: + event-type: image-pushed + client-payload: | + { + "tag_name": "${{ steps.meta.outputs.tags[0] }} ", + "ref_name": "${{ steps.meta.outputs.labels['org.opencontainers.image.revision'] }}", + } diff --git a/.github/workflows/interchain-test.yml b/.github/workflows/interchain-test.yml index 0e2c7b1318..2a3627fb7f 100644 --- a/.github/workflows/interchain-test.yml +++ b/.github/workflows/interchain-test.yml @@ -1,7 +1,7 @@ name: Interchain Test on: - registry_package: - types: [published] + repository_dispatch: + types: [image-pushed] workflow_dispatch: jobs: @@ -14,8 +14,8 @@ jobs: id: get-metadata run: | if [[ "${{ github.event_name }}" == 'registry_package' ]]; then - echo "ref_name=${{ github.event.registry_package.package_version.container_metadata.labels['org.opencontainers.image.revision'] }}" | tee -a $GITHUB_OUTPUT - echo "tag_name=${{ github.event.registry_package.package_version.tag_name }}" | tee -a $GITHUB_OUTPUT + echo "ref_name=${{ github.event.client_payload.ref_name }}" | tee -a $GITHUB_OUTPUT + echo "tag_name=${{ github.event.client_payload.tag_name }}" | tee -a $GITHUB_OUTPUT else echo "ref_name=${{ github.ref_name }}" | tee -a $GITHUB_OUTPUT echo "tag_name=${{ github.ref_name }}" | tee -a $GITHUB_OUTPUT @@ -50,7 +50,7 @@ jobs: uses: actions/setup-go@v5 - name: Run test env: - TEST_DOCKER_REGISTRY: "ghcr.io/fastfadingviolets" + TEST_DOCKER_REGISTRY: "ghcr.io/${{ github.repository_owner }}" TEST_OLD_GAIA_IMAGE_VERSION: "${{ matrix.previous_version }}" TEST_NEW_GAIA_IMAGE_VERSION: "${{ matrix.test_version }}" TEST_UPGRADE_NAME: "${{ matrix.upgrade_name }}" diff --git a/tests/interchain/consumer_launch_test.go b/tests/interchain/consumer_launch_test.go index b88f9d5616..48a99ae864 100644 --- a/tests/interchain/consumer_launch_test.go +++ b/tests/interchain/consumer_launch_test.go @@ -3,7 +3,7 @@ package interchain_test import ( "testing" - "github.com/cosmos/gaia/v18/tests/interchain/chainsuite" + "github.com/cosmos/gaia/v19/tests/interchain/chainsuite" "github.com/stretchr/testify/suite" ) diff --git a/tests/interchain/matrix_tool/main.go b/tests/interchain/matrix_tool/main.go index b33ceae413..b0162313a2 100644 --- a/tests/interchain/matrix_tool/main.go +++ b/tests/interchain/matrix_tool/main.go @@ -19,8 +19,12 @@ import ( ) func GetPreviousMajorMinor(ctx context.Context, testVersion string) (previousMajor string, previousMinor string, upgradeName string, err error) { + org, ok := os.LookupEnv("GITHUB_REPOSITORY_OWNER") + if !ok { + org = "cosmos" + } client := github.NewClient(nil) - releaes, _, err := client.Repositories.ListReleases(ctx, "fastfadingviolets", "gaia", nil) + releaes, _, err := client.Repositories.ListReleases(ctx, org, "gaia", nil) if err != nil { err = fmt.Errorf("ListReleases failed: %w", err) return diff --git a/tests/interchain/txs_test.go b/tests/interchain/txs_test.go index 03d75d3894..ca177ac963 100644 --- a/tests/interchain/txs_test.go +++ b/tests/interchain/txs_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/cosmos/cosmos-sdk/x/params/client/utils" - "github.com/cosmos/gaia/v18/tests/interchain/chainsuite" + "github.com/cosmos/gaia/v19/tests/interchain/chainsuite" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testutil"