diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35beee5..61c500f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,8 @@ on: - ci-test env: - SO_VERSION: v1.1.0-87fffca-202404110321 + SO_VERSION: v1.1.0-36d4969-202407091537 + FIXTURENET_ETH_STACKS_REF: roysc/set-validator-creds # TODO: merge jobs: unit-tests: @@ -63,11 +64,18 @@ jobs: ref: ${{ env.SO_VERSION }} path: ./stack-orchestrator - run: pip install ./stack-orchestrator + - name: Clone fixturenet stack repo + uses: actions/checkout@v4 + with: + repository: cerc-io/fixturenet-eth-stacks + ref: ${{ env.FIXTURENET_ETH_STACKS_REF }} + path: ./fixturenet-eth-stacks + progress: false - name: Run testnet stack env: CERC_GO_AUTH_TOKEN: ${{ secrets.CICD_REPO_TOKEN }} - run: ./scripts/integration-setup.sh + run: ./scripts/run-test-stack.sh ./fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-plugeth - name: Run contract deployer run: | docker compose -f test/compose-deployer.yml up --wait --quiet-pull diff --git a/scripts/integration-setup.sh b/scripts/run-test-stack.sh similarity index 60% rename from scripts/integration-setup.sh rename to scripts/run-test-stack.sh index 26ec482..1401249 100755 --- a/scripts/integration-setup.sh +++ b/scripts/run-test-stack.sh @@ -1,39 +1,41 @@ #!/bin/bash -# Builds and deploys a stack with only what we need. -# This script assumes we are running in the project root. -set -e +set -ex -laconic_so="${LACONIC_SO:-laconic-so} --stack $(readlink -f test) --verbose" +stack_dir=$(readlink -f "$1") +[[ -d "$stack_dir" ]] CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}") +# By default assume we are running in the project root. +export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}" -# Prevent conflicting tty output -export BUILDKIT_PROGRESS=plain +laconic_so="laconic-so --verbose --stack $stack_dir" -# Point stack-orchestrator to the multi-project root -export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-..}" -# v5 migrations only go up to version 20 -echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=20 >> $CONFIG_DIR/stack.env -# don't run plugeth in the debugger +# Don't run geth/plugeth in the debugger, it will swallow error backtraces echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env +# Passing this lets us run eth_call forwarding tests without running ipld-eth-db +echo CERC_RUN_STATEDIFF=${CERC_RUN_STATEDIFF:-true} >> $CONFIG_DIR/stack.env -set -x if [[ -z $SKIP_BUILD ]]; then - $laconic_so setup-repositories \ - --exclude git.vdb.to/cerc-io/ipld-eth-server - # Assume the tested image has been built separately - $laconic_so build-containers \ - --exclude cerc/ipld-eth-server + # Prevent conflicting tty output + export BUILDKIT_PROGRESS=plain + + $laconic_so setup-repositories + $laconic_so build-containers fi -$laconic_so deploy \ - --env-file $CONFIG_DIR/stack.env \ - --cluster test up +if ! $laconic_so deploy \ + --env-file $CONFIG_DIR/stack.env \ + --cluster test up +then + $laconic_so deploy --cluster test logs + exit 1 +fi set +x +# Get IPv4 endpoint of geth and bootnode file server bootnode_endpoint=localhost:$(docker port test-fixturenet-eth-bootnode-geth-1 9898 | head -1 | cut -d':' -f2) geth_endpoint=localhost:$(docker port test-fixturenet-eth-geth-1-1 8545 | head -1 | cut -d':' -f2) diff --git a/test/stack.yml b/test/stack.yml deleted file mode 100644 index bccd0c1..0000000 --- a/test/stack.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "1.2" -name: fixturenet-plugeth-tx -description: "Plugeth Ethereum Fixturenet for testing ipld-eth-db-validator" -repos: - - git.vdb.to/cerc-io/plugeth@statediff - - git.vdb.to/cerc-io/plugeth-statediff - - git.vdb.to/cerc-io/lighthouse - - git.vdb.to/cerc-io/ipld-eth-db@v5.2.1-alpha - - git.vdb.to/cerc-io/tx-spammer -containers: - - cerc/plugeth-statediff - - cerc/plugeth - - cerc/fixturenet-eth-genesis - - cerc/fixturenet-plugeth-plugeth - - cerc/lighthouse - - cerc/lighthouse-cli - - cerc/fixturenet-eth-lighthouse - - cerc/ipld-eth-db - - cerc/tx-spammer -pods: - - fixturenet-plugeth - - ipld-eth-db - - tx-spammer