-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# schedule: | ||
# - cron: "0 0 * * *" # Runs every day at midnight | ||
# workflow_dispatch: | ||
|
||
jobs: | ||
integration: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install jq | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y jq | ||
- name: Integration | ||
run: ./scripts/integration.sh | ||
env: | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
pushd "./omnichain/swap" | ||
|
||
yarn | ||
|
||
npx hardhat compile --force | ||
|
||
echo "Testing omnichain Swap" | ||
|
||
OMNICHAIN_SWAP_CONTRACT=$(npx hardhat deploy --network zeta_testnet --json | jq -r '.address') | ||
|
||
echo $OMNICHAIN_SWAP_CONTRACT | ||
|
||
OMNICHAIN_SWAP_TX_SHOULD_SUCCEED=$(npx hardhat interact --contract $OMNICHAIN_SWAP_CONTRACT --network goerli_testnet --amount 0.01 --recipient 0x2cD3D070aE1BD365909dD859d29F387AA96911e1 --destination mumbai_testnet --json | jq -r '.hash') | ||
|
||
echo $OMNICHAIN_SWAP_TX_SHOULD_SUCCEED | ||
|
||
OMNICHAIN_SWAP_CCTX_SHOULD_SUCCEED=$(npx hardhat cctx $OMNICHAIN_SWAP_TX_SHOULD_SUCCEED --json) | ||
|
||
echo $OMNICHAIN_SWAP_CCTX_SHOULD_SUCCEED | ||
|
||
popd |