From e817c725ef838ce3073a7cb1af07e00127f7ae31 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Wed, 23 Oct 2024 10:47:55 -0500 Subject: [PATCH] e2e: please work --- .github/workflows/e2e.yml | 18 ++++++++++++++---- e2e/sh/run_test.sh | 8 +++----- evm/test/script/start_anvil.sh | 4 ++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 26e351a7..155404eb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,7 +13,9 @@ env: jobs: test: name: bash sh/run_test.sh - runs-on: ubuntu-latest + runs-on: + labels: + ubuntu-latest-m steps: - uses: actions/checkout@v4 with: @@ -25,6 +27,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: npm install --global yarn + run: npm install --global yarn - name: Install Solana CLI tools run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_VERSION }}/install)" shell: bash @@ -36,12 +40,18 @@ jobs: shell: bash - name: make node_modules run: make node_modules - - name: make build + - name: cd evm && make build run: make build working-directory: ./evm - - name: npm run build + - name: cd evm/ts-sdk && npm run build run: npm run build working-directory: ./evm/ts-sdk - - name: bash sh/run_test.sh + - name: cd solana && make anchor-test-setup + run: make anchor-test-setup + working-directory: ./solana + - name: cd solana && anchor build -- --features integration-test + run: anchor build -- --features integration-test + working-directory: ./solana + - name: cd e2e && bash sh/run_test.sh run: bash sh/run_test.sh working-directory: ./e2e diff --git a/e2e/sh/run_test.sh b/e2e/sh/run_test.sh index 001d2f99..7ea4ca91 100644 --- a/e2e/sh/run_test.sh +++ b/e2e/sh/run_test.sh @@ -10,17 +10,15 @@ sed -E -i 's/^test \= ".+"/test = "npx ts-mocha -p .\/tsconfig.anchor-test.json mkdir -p target/deploy +cd $ROOT/solana +cp target/deploy/swap_layer.so $ROOT/e2e/target/deploy + # start anvil in the evm directory cd $ROOT/evm bash test/script/start_anvil.sh echo "Anvil instances started successfully." -cd $ROOT/solana -make anchor-test-setup -anchor build -- --features integration-test -cp target/deploy/swap_layer.so $ROOT/e2e/target/deploy - cd $ROOT/e2e anchor test --skip-build diff --git a/evm/test/script/start_anvil.sh b/evm/test/script/start_anvil.sh index 2e8a0f0a..f4898f2f 100644 --- a/evm/test/script/start_anvil.sh +++ b/evm/test/script/start_anvil.sh @@ -13,6 +13,8 @@ OWNER_PRIVATE_KEY=0x646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a . $ENV/Ethereum.env +echo $RELEASE_RPC + # Ethereum (CCTP). anvil --port 8548 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \ @@ -29,6 +31,8 @@ forge script $ROOT/DeploySwapLayerForTest.s.sol \ . $ENV/Base.env +echo $RELEASE_RPC + # Base (CCTP). anvil --port 8549 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \