Skip to content

Commit

Permalink
Run e2e test via new build system compose script.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielye committed Oct 26, 2023
1 parent e8cf579 commit 70f89a8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 36 deletions.
64 changes: 32 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ checkout: &checkout
setup_env: &setup_env
run:
name: "Setup environment"
command: ./build-system/scripts/setup_env "$CIRCLE_SHA1" "$CIRCLE_TAG" "$CIRCLE_JOB" "$CIRCLE_REPOSITORY_URL" "$CIRCLE_BRANCH"
command: ./build-system/scripts/setup_env "$CIRCLE_SHA1" "$CIRCLE_TAG" "$CIRCLE_JOB" "$CIRCLE_REPOSITORY_URL" "$CIRCLE_BRANCH" "$CIRCLE_PULL_REQUEST"

# This step is used to save logs from various barretenberg test to the workspace so that they can be used later to parse benchmark values out of them
save_logs: &save_logs
Expand Down Expand Up @@ -612,7 +612,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_2_pxes.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_2_pxes.test.ts
environment: { DEBUG: "aztec:*" }

e2e-multiple-accounts-1-enc-key:
Expand All @@ -624,7 +624,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_multiple_accounts_1_enc_key.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_multiple_accounts_1_enc_key.test.ts
environment: { DEBUG: "aztec:*" }

e2e-deploy-contract:
Expand All @@ -636,7 +636,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_deploy_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_deploy_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-lending-contract:
Expand All @@ -648,7 +648,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_lending_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_lending_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-token-contract:
Expand All @@ -660,7 +660,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_token_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_token_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-sandbox-example:
Expand All @@ -672,7 +672,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_sandbox_example.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_sandbox_example.test.ts
environment: { DEBUG: "aztec:*" }

e2e-block-building:
Expand All @@ -684,7 +684,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_block_building.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_block_building.test.ts
environment: { DEBUG: "aztec:*" }

e2e-nested-contract:
Expand All @@ -696,7 +696,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_nested_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_nested_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-non-contract-account:
Expand All @@ -708,7 +708,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_non_contract_account.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_non_contract_account.test.ts
environment: { DEBUG: "aztec:*" }

e2e-cross-chain-messaging:
Expand All @@ -720,7 +720,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_cross_chain_messaging.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_cross_chain_messaging.test.ts
environment: { DEBUG: "aztec:*" }

e2e-public-cross-chain-messaging:
Expand All @@ -732,7 +732,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_public_cross_chain_messaging.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_public_cross_chain_messaging.test.ts
environment: { DEBUG: "aztec:*" }

e2e-public-to-private-messaging:
Expand All @@ -744,7 +744,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_public_to_private_messaging.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_public_to_private_messaging.test.ts
environment: { DEBUG: "aztec:*" }

e2e-account-contracts:
Expand All @@ -756,7 +756,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_account_contracts.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_account_contracts.test.ts
environment: { DEBUG: "aztec:*" }

e2e-escrow-contract:
Expand All @@ -768,7 +768,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_escrow_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_escrow_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-pending-commitments-contract:
Expand All @@ -780,7 +780,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_pending_commitments_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_pending_commitments_contract.test.ts
environment: { DEBUG: "aztec:*" }

e2e-ordering:
Expand All @@ -792,7 +792,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_ordering.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_ordering.test.ts
environment: { DEBUG: "aztec:*" }

uniswap-trade-on-l1-from-l2:
Expand All @@ -804,7 +804,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local uniswap_trade_on_l1_from_l2.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=uniswap_trade_on_l1_from_l2.test.ts
environment: { DEBUG: "aztec:*" }

integration-archiver-l1-to-l2:
Expand All @@ -816,7 +816,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local integration_archiver_l1_to_l2.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=integration_archiver_l1_to_l2.test.ts
environment: { DEBUG: "aztec:*" }

integration-l1-publisher:
Expand All @@ -828,7 +828,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local integration_l1_publisher.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=integration_l1_publisher.test.ts
environment: { DEBUG: "aztec:*" }

e2e-cli:
Expand All @@ -840,7 +840,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_cli.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_cli.test.ts
environment: { DEBUG: "aztec:*" }

e2e-p2p:
Expand All @@ -852,7 +852,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_p2p_network.test.ts ./scripts/docker-compose-no-sandbox.yml
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml -e TEST=e2e_p2p_network.test.ts
environment: { DEBUG: "aztec:*" }

e2e-browser-sandbox:
Expand All @@ -864,7 +864,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_aztec_js_browser.test.ts ./scripts/docker-compose-browser.yml
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-browser.yml -e TEST=e2e_aztec_js_browser.test.ts
environment: { DEBUG: "aztec:*" }

e2e-card-game:
Expand All @@ -876,7 +876,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local e2e_card_game.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=e2e_card_game.test.ts
environment: { DEBUG: "aztec:*" }

pxe-sandbox:
Expand All @@ -888,7 +888,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local pxe_sandbox.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=pxe_sandbox.test.ts
environment: { DEBUG: "aztec:*" }

cli-docs-sandbox:
Expand All @@ -900,7 +900,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local cli_docs_sandbox.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=cli_docs_sandbox.test.ts
environment: { DEBUG: "aztec:*" }

guides-writing-an-account-contract:
Expand All @@ -912,7 +912,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local guides/writing_an_account_contract.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=guides/writing_an_account_contract.test.ts
environment: { DEBUG: "aztec:*" }

guides-dapp-testing:
Expand All @@ -924,7 +924,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local guides/dapp_testing.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=guides/dapp_testing.test.ts
environment: { DEBUG: "aztec:*" }

guides-sample-dapp:
Expand All @@ -936,7 +936,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local sample-dapp
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=sample-dapp
environment: { DEBUG: "aztec:*" }

guides-up-quick-start:
Expand All @@ -948,7 +948,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local guides/up_quick_start.test.ts
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml -e TEST=guides/up_quick_start.test.ts
environment: { DEBUG: "aztec:*" }

bench-publish-rollup:
Expand All @@ -960,7 +960,7 @@ jobs:
- *setup_env
- run:
name: "Benchmark"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local benchmarks/bench_publish_rollup.test.ts ./scripts/docker-compose-no-sandbox.yml
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml -e TEST=benchmarks/bench_publish_rollup.test.ts
environment:
DEBUG: "aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees"

Expand All @@ -973,7 +973,7 @@ jobs:
- *setup_env
- run:
name: "Benchmark"
command: cond_spot_run_script end-to-end 4 ./scripts/run_tests_local benchmarks/bench_process_history.test.ts ./scripts/docker-compose-no-sandbox.yml
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml -e TEST=benchmarks/bench_process_history.test.ts
environment:
DEBUG: "aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees"

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ for PARENT_REPO in $(query_manifest dependencies $REPOSITORY); do
fetch_image $PARENT_IMAGE_URI
# Tag it to look like an official release as that's what we use in Dockerfiles.
TAG=$ECR_DEPLOY_URL/$PARENT_REPO
retry docker tag $PARENT_IMAGE_URI $TAG
docker tag $PARENT_IMAGE_URI $TAG
done

COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY false)
Expand Down
2 changes: 0 additions & 2 deletions build-system/scripts/query_manifest
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ case "$CMD" in
ALL_DEPS+=("$1")
}
add_deps $REPO
# Remove ourself as a dependency.
# unset ALL_DEPS[-1]
for DEP in "${ALL_DEPS[@]}"; do
echo $DEP
done
Expand Down
3 changes: 2 additions & 1 deletion build-system/scripts/setup_env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COMMIT_TAG=${2##*aztec-packages-}
JOB_NAME=$3
GIT_REPOSITORY_URL=${4:-}
BRANCH=${5:-}
COMMIT_MESSAGE=${6:-}
PULL_REQUEST=${6:-}

BASH_ENV=${BASH_ENV:-}
BUILD_SYSTEM_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
Expand Down Expand Up @@ -87,6 +87,7 @@ echo export GIT_REPOSITORY_URL=$GIT_REPOSITORY_URL >> $BASH_ENV
echo export VERSION_TAG=$VERSION_TAG >> $BASH_ENV
echo export DEPLOY_TAG=$DEPLOY_TAG >> $BASH_ENV
echo export BRANCH=$BRANCH >> $BASH_ENV
echo export PULL_REQUEST=$PULL_REQUEST >> $BASH_ENV

# Only run the following if we're the result of a commit (i.e. not being run manually).
if [ -n "$COMMIT_HASH" ]; then
Expand Down

0 comments on commit 70f89a8

Please sign in to comment.