Skip to content

Commit

Permalink
e2e: please work
Browse files Browse the repository at this point in the history
  • Loading branch information
a5-pickle committed Oct 23, 2024
1 parent 9399345 commit 7e4770b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ env:
jobs:
test:
name: bash sh/run_test.sh
runs-on: ubuntu-latest
runs-on:
labels: ubuntu-latest-l
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -25,6 +26,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
Expand All @@ -36,12 +39,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
working-directory: ./e2e
8 changes: 3 additions & 5 deletions e2e/sh/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions evm/test/script/start_anvil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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" \
Expand Down

0 comments on commit 7e4770b

Please sign in to comment.