From 58428f858d0cebed1ea65956600608c95ef99480 Mon Sep 17 00:00:00 2001 From: Proph3t Date: Fri, 11 Aug 2023 19:48:28 +0000 Subject: [PATCH] Add `setup_tests.sh` for setting up your local machine for tests (#2594) --- setup_tests.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 setup_tests.sh diff --git a/setup_tests.sh b/setup_tests.sh new file mode 100755 index 0000000000..fda85b11e9 --- /dev/null +++ b/setup_tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +active_version=$(solana -V | awk '{print $2}') +if [ "$active_version" != "1.16.0" ]; then + solana-install init 1.16.0 +fi + +git submodule update --init --recursive --depth 1 +cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && yarn link --force && cd ../../../ +cd ts/packages/anchor && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../ +cd ts/packages/spl-associated-token-account && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../ +cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../ +cd examples/tutorial && yarn link @coral-xyz/anchor @coral-xyz/borsh && yarn --frozen-lockfile && cd ../../ +cd tests && yarn link @coral-xyz/anchor @coral-xyz/borsh @coral-xyz/spl-associated-token-account @coral-xyz/spl-token && yarn --frozen-lockfile && cd .. +cargo install --path cli anchor-cli --locked --force --debug