Skip to content

Commit

Permalink
integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 8, 2023
1 parent ad5d2c5 commit 578076b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/integration.yaml
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 }}
25 changes: 25 additions & 0 deletions scripts/integration.sh
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

0 comments on commit 578076b

Please sign in to comment.