From d509dc359c4cd9dc37492a434a1eb3813c002839 Mon Sep 17 00:00:00 2001 From: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:51:12 +0100 Subject: [PATCH] fix(build): Fix build system post deployment tests (#2420) This PR fixes the post deployment test runs in the build system. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist). --- .circleci/config.yml | 24 ++++++++++++------------ build-system/scripts/run_script | 13 +++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100755 build-system/scripts/run_script diff --git a/.circleci/config.yml b/.circleci/config.yml index c84aa80a44f..56c7c46b84c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1229,37 +1229,37 @@ jobs: command: build canary true run-deployment-canary-uniswap: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + machine: + image: ubuntu-2004:202010-01 + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml run-deployment-canary-browser: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + machine: + image: ubuntu-2004:202010-01 + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary aztec_js_browser.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/aztec_js_browser.test.ts canary ./scripts/docker-compose.yml run-deployment-canary-cli: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + machine: + image: ubuntu-2004:202010-01 + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary cli.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/cli.test.ts canary ./scripts/docker-compose.yml # Repeatable config for defining the workflow below. tag_regex: &tag_regex /^aztec-packages-v.*/ diff --git a/build-system/scripts/run_script b/build-system/scripts/run_script new file mode 100755 index 00000000000..97ae0163fb4 --- /dev/null +++ b/build-system/scripts/run_script @@ -0,0 +1,13 @@ +#!/bin/bash +# Runs a script from within the provided repository project directory +# +# Arguments are: +# 1. REPOSITORY: The project repository name in ECR. +# 2... ARGS: Script and arguments to run. +[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace +set -eu + +REPOSITORY=$1 +shift +cd $(query_manifest projectDir $REPOSITORY) +$@