Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run make test-interchain in CI #3643

Merged
merged 15 commits into from
Jul 1, 2024
Merged
3 changes: 3 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
test:
uses: ./.github/workflows/test.yml

test-interchain:
uses: ./.github/workflows/test-interchain.yml

goreleaser:
uses: ./.github/workflows/goreleaser.yml
permissions: write-all
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/test-interchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: test-interchain
on:
workflow_call:

env:
DOCKER_IMAGE: celestiaorg/celestia-app
ARTIFACT_NAME: celestia-app-docker-image
ARTIFACT_PATH: celestia-app-docker-image.tar

jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build celestia-app Docker image
run: make build-docker

- name: Save Docker image as artifact
run: docker image save -o ${{ env.ARTIFACT_PATH }} ${{ env.DOCKER_IMAGE }}

- name: Publish Docker image as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}


test-interchain:
needs: build-docker
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}

- name: Load Docker image
run: docker image load -i ${{ env.ARTIFACT_PATH }}

- name: Print Docker images
run: docker images

- name: Run interchain tests
run: make test-interchain
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ test-fuzz:

## test-interchain: Run interchain tests in verbose mode. Requires Docker.
test-interchain:
@echo "Reminder: this test uses the latest celestia-app Docker image. If you would like to test recent code changes, re-build the Docker image by running: make build-docker"
@echo "--> Running interchain tests"
@cd ./test/interchain && go test . -v
.PHONY: test-interchain
Expand Down
4 changes: 2 additions & 2 deletions test/interchain/chainspec/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

const (
celestiaDockerRepository = "ghcr.io/celestiaorg/celestia-app"
celestiaDockerTag = "pr-3182"
celestiaDockerRepository = "celestiaorg/celestia-app"
celestiaDockerTag = "latest"
celestiaUidGid = "10001:10001"
)

Expand Down
8 changes: 2 additions & 6 deletions test/interchain/chainspec/cosmosHub.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ import (
)

const (
// TODO: As of this writing, gaia has no official releases with the ICA
// controller enabled. However, they do have it enabled on `main` so the
// Docker image below is a custom build from `main`. Replace this with an
// official release when available (likely >= 16.0.0).
cosmosDockerRepository = "docker.io/rootulp/gaia"
cosmosDockerVersion = "ica-controller"
cosmosDockerRepository = "ghcr.io/strangelove-ventures/heighliner/gaia"
cosmosDockerVersion = "v17.2.0"
cosmosUidGid = "1025:1025"
)

Expand Down
Loading