deposite/withdrawal Ton native token ci test #2
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
name: Deposit-Withdrawal Test | |
on: | |
push: | |
paths: | |
- '**' | |
jobs: | |
env-setting: | |
name: Deposit_WithdrawalTest_Devent | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add repo to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Restore PNPM Package Cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: pnpm-packages-v2-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Copy foundry from Docker container | |
run: | | |
container_id=$(docker create onthertech/titan-ci-builder:latest) | |
mkdir -p $HOME/bin | |
docker cp $container_id:/usr/local/bin/cast $HOME/bin/ | |
docker cp $container_id:/usr/local/bin/anvil $HOME/bin/ | |
docker cp $container_id:/usr/local/bin/forge $HOME/bin/ | |
docker rm $container_id | |
- name: Set permissions_add PATH | |
run: | | |
chmod +x $HOME/bin/* | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Install Geth | |
uses: gacts/install-geth-tools@v1 | |
with: | |
version: '1.13.4' | |
- name: Install pnpm | |
run: npm install -g pnpm@8 | |
- name: Install packages | |
run: | | |
pnpm install | |
- name: Save PNPM Package Cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: pnpm-packages-v2-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Get Cache Location | |
id: cache | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_ENV | |
- name: Build necessary projects | |
run: pnpm run build | |
- name: Run devnet-up command | |
run: make devnet-up | |
- name: Execute test code | |
run: | | |
cd packages/tokamak/sdk | |
npx hardhat deposit-ton --amount 40 --to 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC --network devnetL1 |