Skip to content

Commit

Permalink
interchain fixess
Browse files Browse the repository at this point in the history
  • Loading branch information
fastfadingviolets committed Jul 16, 2024
1 parent 8d095c3 commit e061928
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'] }}",
}
10 changes: 5 additions & 5 deletions .github/workflows/interchain-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Interchain Test
on:
registry_package:
types: [published]
repository_dispatch:
types: [image-pushed]
workflow_dispatch:

jobs:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/interchain/consumer_launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 5 additions & 1 deletion tests/interchain/matrix_tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/interchain/txs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e061928

Please sign in to comment.