From 9ebf842371eadfe6c98c5ef5972cdf6288eeb538 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:36:32 +0000 Subject: [PATCH] fix: move bb js test into dockerfile --- .circleci/config.yml | 2 +- circuits/cpp/barretenberg/ts/Dockerfile | 5 +++++ circuits/cpp/barretenberg/ts/bb.js-dev | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb9e9b3b270..564d37a49f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -238,7 +238,7 @@ jobs: - *setup_env - run: name: "Test" - command: cond_spot_run_test_script ./scripts/bin-test.sh bb.js + command: cond_spot_run_test_script ../scripts/bin-test.sh bb.js barretenberg-benchmark-aggregator: docker: diff --git a/circuits/cpp/barretenberg/ts/Dockerfile b/circuits/cpp/barretenberg/ts/Dockerfile index 1a94506a443..14f47a9ea56 100644 --- a/circuits/cpp/barretenberg/ts/Dockerfile +++ b/circuits/cpp/barretenberg/ts/Dockerfile @@ -13,4 +13,9 @@ RUN yarn --immutable COPY . . ENV DOCKER_ENV=true RUN yarn formatting && yarn build:ts:browser && yarn build:ts:node + +# Run bb.js binary tests +WORKDIR /usr/src/barretenberg/ts/bin-test +RUN ./bin-test.sh + CMD ["yarn", "test"] diff --git a/circuits/cpp/barretenberg/ts/bb.js-dev b/circuits/cpp/barretenberg/ts/bb.js-dev index 1f93688795d..2a937ae1e52 100755 --- a/circuits/cpp/barretenberg/ts/bb.js-dev +++ b/circuits/cpp/barretenberg/ts/bb.js-dev @@ -3,4 +3,4 @@ # Now you can run bb.js-dev anywhere to execute latest code, no 'yarn build' required. SCRIPT_PATH=$(dirname $(realpath $0)) export TS_NODE_PROJECT="$SCRIPT_PATH/tsconfig.node.json" -npx nodemon --ext '.ts' --watch 'src/**/*.ts' --exec "ts-node -r tsconfig-paths/register" $SCRIPT_PATH/src/main.ts $@ +npx -y nodemon --ext '.ts' --watch 'src/**/*.ts' --exec "ts-node -r tsconfig-paths/register" $SCRIPT_PATH/src/main.ts $@