From 6b265d7e47d4a0a8af7879f52ae48f3df6b96040 Mon Sep 17 00:00:00 2001 From: John Letey Date: Thu, 9 May 2024 15:02:45 +0200 Subject: [PATCH] chore: cleanup --- .github/workflows/e2e-tests.yaml | 75 ++++++++++++++++--------------- .github/workflows/unit-tests.yaml | 20 --------- e2e/forwarding_test.go | 1 + 3 files changed, 39 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/unit-tests.yaml diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index 32777af..2ee903f 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -1,6 +1,7 @@ name: End to End Tests on: + push: pull_request: env: @@ -12,74 +13,74 @@ concurrency: cancel-in-progress: true jobs: - build-docker: + build: runs-on: ubuntu-latest steps: - - name: Build Docker image - uses: strangelove-ventures/heighliner-build-action@v1.0.1 - with: - registry: "" # empty registry, image only shared for e2e testing - tag: local # emulate local environment for consistency in interchaintest cases - tar-export-path: ${{ env.TAR_PATH }} # export a tarball that can be uploaded as an artifact for the e2e jobs - platform: linux/amd64 # test runner architecture only - git-ref: ${{ github.head_ref }} # source code ref + - name: Build Docker image + uses: strangelove-ventures/heighliner-build-action@v1.0.1 + with: + registry: "" # empty registry, image only shared for e2e testing + tag: local # emulate local environment for consistency in interchaintest cases + tar-export-path: ${{ env.TAR_PATH }} # export a tarball that can be uploaded as an artifact for the e2e jobs + platform: linux/amd64 # test runner architecture only + git-ref: ${{ github.head_ref }} # source code ref + + # Heighliner chains.yaml config + chain: noble-forwarding-simd + dockerfile: cosmos + build-target: make build + build-dir: simapp + binaries: | + - simapp/build/simd - # Heighliner chains.yaml config - chain: noble-forwarding-simd - dockerfile: cosmos - build-target: make build - build-dir: simapp - binaries: | - - simapp/build/simd - - - name: Publish Tarball as Artifact - uses: actions/upload-artifact@v3 - with: + - name: Publish Tarball as Artifact + uses: actions/upload-artifact@v4 + with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.TAR_PATH }} - prepare-e2e-tests: + prepare: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout code + - name: Checkout Repository uses: actions/checkout@v4 - - name: Set up Go 1.22 - uses: actions/setup-go@v4 + - name: Install Go + uses: actions/setup-go@v5 with: - go-version: '^1.22' + go-version: "1.22" - - name: Generate matrix + - name: Generate Matrix id: set-matrix run: | # Run the command and convert its output to a JSON array TESTS=$(cd e2e && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]') echo "matrix=${TESTS}" >> $GITHUB_OUTPUT - e2e-tests: + test: needs: - - build-docker - - prepare-e2e-tests + - build + - prepare runs-on: ubuntu-latest strategy: matrix: # names of `make` commands to run tests - test: ${{fromJson(needs.prepare-e2e-tests.outputs.matrix)}} + test: ${{fromJson(needs.prepare.outputs.matrix)}} fail-fast: false steps: - - name: Set up Go 1.22 - uses: actions/setup-go@v4 - with: - go-version: '^1.22' - - - name: checkout chain + - name: Checkout Repository uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml deleted file mode 100644 index 2e8b2a7..0000000 --- a/.github/workflows/unit-tests.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Unit Tests - -on: - pull_request: - -jobs: - unit-tests: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: ^1.22 - - - name: Run Unit Tests - run: go test -v ./... - \ No newline at end of file diff --git a/e2e/forwarding_test.go b/e2e/forwarding_test.go index 6df9351..5e8222f 100644 --- a/e2e/forwarding_test.go +++ b/e2e/forwarding_test.go @@ -214,6 +214,7 @@ func ForwardingSuite(t *testing.T) (ctx context.Context, noble *cosmos.CosmosCha factory := interchaintest.NewBuiltinChainFactory(logger, []*interchaintest.ChainSpec{ { Name: "forwarding", + Version: "local", NumValidators: &numValidators, NumFullNodes: &numFullNodes, ChainConfig: ibc.ChainConfig{