From bf6c2f01cdfda1279060552ad5e297c8a83afbf6 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Thu, 7 Nov 2024 08:43:41 -0800 Subject: [PATCH] test: add e2e consensus test --- .github/workflows/e2e.yml | 5 +++++ Makefile | 8 +++++++- contrib/localnet/docker-compose.yml | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4aadf4900e..43a8e174ce 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -111,6 +111,7 @@ jobs: outputs: DEFAULT_TESTS: ${{ steps.matrix-conditionals.outputs.DEFAULT_TESTS }} UPGRADE_TESTS: ${{ steps.matrix-conditionals.outputs.UPGRADE_TESTS }} + CONSENSUS_TESTS: ${{ steps.matrix-conditionals.outputs.CONSENSUS_TESTS }} UPGRADE_LIGHT_TESTS: ${{ steps.matrix-conditionals.outputs.UPGRADE_LIGHT_TESTS }} UPGRADE_IMPORT_MAINNET_TESTS: ${{ steps.matrix-conditionals.outputs.UPGRADE_IMPORT_MAINNET_TESTS }} ADMIN_TESTS: ${{ steps.matrix-conditionals.outputs.ADMIN_TESTS }} @@ -138,6 +139,7 @@ jobs: console.log("labels:", labels); core.setOutput('DEFAULT_TESTS', true); core.setOutput('UPGRADE_TESTS', labels.includes('UPGRADE_TESTS')); + core.setOutput('CONSENSUS_TESTS', !labels.includes('CONSENSUS_BREAKING_ACK')); core.setOutput('UPGRADE_LIGHT_TESTS', labels.includes('UPGRADE_LIGHT_TESTS')); core.setOutput('UPGRADE_IMPORT_MAINNET_TESTS', labels.includes('UPGRADE_IMPORT_MAINNET_TESTS')); core.setOutput('ADMIN_TESTS', labels.includes('ADMIN_TESTS')); @@ -206,6 +208,9 @@ jobs: - make-target: "start-e2e-test" runs-on: ubuntu-20.04 run: ${{ needs.matrix-conditionals.outputs.DEFAULT_TESTS == 'true' }} + - make-target: "start-e2e-consensus-test" + runs-on: ubuntu-20.04 + run: ${{ needs.matrix-conditionals.outputs.CONSENSUS_TESTS == 'true' }} - make-target: "start-upgrade-test" runs-on: ubuntu-20.04 run: ${{ needs.matrix-conditionals.outputs.UPGRADE_TESTS == 'true' }} diff --git a/Makefile b/Makefile index 38cd6d3be7..ebeacdb26e 100644 --- a/Makefile +++ b/Makefile @@ -268,7 +268,7 @@ solana: start-e2e-test: e2e-images @echo "--> Starting e2e test" - cd contrib/localnet/ && $(DOCKER_COMPOSE) up -d + cd contrib/localnet/ && $(DOCKER_COMPOSE) up -d start-e2e-admin-test: e2e-images @echo "--> Starting e2e admin test" @@ -286,6 +286,12 @@ start-e2e-import-mainnet-test: e2e-images export ZETACORED_START_PERIOD=15m && \ cd contrib/localnet/ && ./scripts/import-data.sh mainnet && $(DOCKER_COMPOSE) up -d +start-e2e-consensus-test: e2e-images + @echo "--> Starting e2e consensus test" + export ZETACORE1_IMAGE=ghcr.io/zeta-chain/zetanode:develop && \ + export ZETACORE1_PLATFORM=linux/amd64 && \ + cd contrib/localnet/ && $(DOCKER_COMPOSE) up -d + start-stress-test: e2e-images @echo "--> Starting stress test" cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile stress up -d diff --git a/contrib/localnet/docker-compose.yml b/contrib/localnet/docker-compose.yml index 4f36583d91..670befa7b6 100644 --- a/contrib/localnet/docker-compose.yml +++ b/contrib/localnet/docker-compose.yml @@ -67,7 +67,8 @@ services: - ~/.zetacored/genesis_data:/root/genesis_data zetacore1: - image: zetanode:latest + image: ${ZETACORE1_IMAGE-zetanode:latest} + platform: ${ZETACORE1_PLATFORM-} container_name: zetacore1 hostname: zetacore1 networks: