Skip to content

Improve initialization script with liquidity and whitelists #65

Improve initialization script with liquidity and whitelists

Improve initialization script with liquidity and whitelists #65

Workflow file for this run

name: Smart Contract Tests
on:
push:
branches:
- '*'
pull_request:
branches:
- develop
- main
env:
FOUNDRY_PROFILE: ci
ARBITRUM_SEPOLIA_RPC_URL: ${{ secrets.ARBITRUM_SEPOLIA_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
SCROLL_SEPOLIA_RPC_URL: ${{ secrets.SCROLL_SEPOLIA_RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
BACKEND_EOA: ${{ secrets.BACKEND_EOA }}
BACKEND_PK: ${{ secrets.BACKEND_PK }}
NFT_BASE_URI: https://dev.back.chatterpay.net/nft/metadata/opensea/
FOUNDRY_DISABLE_NIGHTLY_WARNING: 1
jobs:
check:
strategy:
fail-fast: true
name: Smart Contract Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache for Foundry
uses: actions/cache@v3
with:
path: |
.forge-cache
lib
key: ${{ runner.os }}-forge-cache-${{ hashFiles('**/*.sol') }}
- name: Initialize and update submodules
run: git submodule update --init --recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Export all required environment variables to .env
run: env | grep -E '^(FOUNDRY_PROFILE|ARBITRUM_SEPOLIA_RPC_URL|ETH_SEPOLIA_RPC_URL|SCROLL_SEPOLIA_RPC_URL|PRIVATE_KEY|BACKEND_EOA|BACKEND_PK|NFT_BASE_URI|FOUNDRY_DISABLE_NIGHTLY_WARNING)=' > .env
- name: Run Forge build
run: |
forge --version
forge build --sizes 2>&1 | tee forge_build.log || (grep -q "error:" forge_build.log && exit 1 || exit 0)
id: build
# run tests
# Suppress deprecation warnings for testFail* while keeping all other output.
# Ensures that tests run without unnecessary noise in CI logs.
- name: Run Forge tests
run: |
yarn test:local 2>&1 | grep -v "Warning: \`testFail*"
id: test