Skip to content

Commit

Permalink
test: add e2e consensus test
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Nov 7, 2024
1 parent 7c475be commit bf6c2f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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' }}
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion contrib/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bf6c2f0

Please sign in to comment.