Skip to content

Commit

Permalink
ci: add e2e-ibc ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed Nov 22, 2023
1 parent eba817a commit c40edc4
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 13 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/e2e-ibc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: E2E-IBC

on:
pull_request:
push:
tags:
- "**"
branches:
- "main"

permissions:
contents: read
packages: write

env:
GO_VERSION: '1.20'
TAR_PATH: /tmp/fnsad-docker-image.tar
IMAGE_NAME: fnsad

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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

- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
tags: fnsad:local
outputs: type=docker,dest=${{ env.TAR_PATH }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: ${{ env.TAR_PATH }}

e2e-tests:
needs: build-docker
runs-on: ubuntu-latest
strategy:
matrix:
# names of `make` commands to run tests
test:
- "test-e2e-ibc"
fail-fast: false

steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

- name: checkout chain
uses: actions/checkout@v4

- name: Download Tarball Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: /tmp

- name: Load Docker Image
run: |
docker image load -i ${{ env.TAR_PATH }}
docker image ls -a
- name: Run Test
run: make ${{ matrix.test }}
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,18 @@ go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@go mod download

.PHONY: all build install clean wasmvmlib build-reproducible
get-heighliner:
git clone https://github.com/strangelove-ventures/heighliner.git $(TEMPDIR)/heighliner
cd $(TEMPDIR)/heighliner && go install

local-image:
ifeq (,$(shell which heighliner))
echo 'heighliner' binary not found. Consider running `make get-heighliner`
else
heighliner build -c finschia --local --dockerfile cosmos --build-target "wget https://github.com/Finschia/wasmvm/releases/download/$(WASMVM_VERSION)/libwasmvm_muslc.aarch64.a -O /lib/libwasmvm.aarch64.a && make install" --binaries "/go/bin/fnsad"
endif

.PHONY: all build install clean wasmvmlib build-reproducible get-heighliner local-image


###############################################################################
Expand Down Expand Up @@ -176,18 +187,10 @@ test-integration-multi-node: docker-build
test-upgrade-name:
@sh contrib/check-upgrade-name.sh

get-heighliner:
git clone https://github.com/strangelove-ventures/heighliner.git $(TEMPDIR)/heighliner
cd $(TEMPDIR)/heighliner && go install

local-image:
ifeq (,$(shell which heighliner))
echo 'heighliner' binary not found. Consider running `make get-heighliner`
else
heighliner build -c finschia --local --dockerfile cosmos --build-target "wget https://github.com/Finschia/wasmvm/releases/download/$(WASMVM_VERSION)/libwasmvm_muslc.aarch64.a -O /lib/libwasmvm.aarch64.a && make install" --binaries "/go/bin/fnsad"
endif
test-e2e-ibc:
cd interchaintest && go test -v ./...

.PHONY: test test-all test-unit test-race test-cover benchmark test-integration test-integration-multi-node get-heighliner local-image
.PHONY: test test-all test-unit test-race test-cover benchmark test-integration test-integration-multi-node test-e2e-ibc

###############################################################################
### Docker ###
Expand Down
2 changes: 1 addition & 1 deletion interchaintest/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func latestFinschiaChain(numOfValidators, numOfFullNodes int) *interchaintest.Ch
ChainID: "finschia-2",
Images: []ibc.DockerImage{
{
Repository: "finschia",
Repository: "fnsad",
Version: "local",
UidGid: "1025:1025",
},
Expand Down

0 comments on commit c40edc4

Please sign in to comment.