Skip to content

feat(hardhat): add stargate unit test for mainnet-eth/avax-usdc swap #14

feat(hardhat): add stargate unit test for mainnet-eth/avax-usdc swap

feat(hardhat): add stargate unit test for mainnet-eth/avax-usdc swap #14

Workflow file for this run

name: CI (safe to test)
on:
push:
pull_request_target:
types: [labeled]
permissions:
id-token: write
contents: write # Checkout
jobs:
build:
runs-on: ubuntu-latest
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: |
github.event_name == 'push' ||
contains(github.event.pull_request.labels.*.name, 'safe to test') ||
(github.event_name == 'pull_request' && github.event.action != 'labeled')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Build
run: pnpm -C packages/hardhat build
- name: Test hardhat
env:
RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
run: pnpm -C packages/hardhat hardhat-test
- name: Foundry forge test
env:
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
SEPOLIA_RPC_URL: ${{ secrets.SEPOLIA_RPC_URL }}
ARBITRUM_ONE_RPC_URL: ${{ secrets.ARBITRUM_ONE_RPC_URL }}
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
run: pnpm -C packages/hardhat forge-test