Feature/about page update #2499
Workflow file for this run
This file contains hidden or 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
| # This workflow runs the CI command defined in package.json | |
| name: CI | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| TURBO_CONCURRENCY: 1 | |
| ANVIL_BLOCK_NUMBER: 16522514 | |
| ANVIL_FORK_URL: ${{ secrets.MAINNET_RPC_URL || vars.MAINNET_RPC_URL || 'https://eth.llamarpc.com' }} | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: 🔒 Mask Anvil fork URL | |
| run: echo "::add-mask::$ANVIL_FORK_URL" | |
| - name: 📦 Setup Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: 'pnpm' | |
| node-version: 22 | |
| - name: 💾 Cache node_modules | |
| uses: actions/cache@v4 | |
| id: cache-node-modules | |
| with: | |
| path: | | |
| node_modules | |
| apps/**/node_modules | |
| packages/**/node_modules | |
| packages/**/dist | |
| key: modules-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: ⏬ Install Dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: pnpm i | |
| - name: 💾 Cache Anvil | |
| uses: 'actions/cache@v4' | |
| with: | |
| path: ~/.foundry/cache/rpc/**/${{ env.ANVIL_BLOCK_NUMBER }} | |
| key: foundry-anvil-${{ env.ANVIL_BLOCK_NUMBER }} | |
| - name: 👾 Run lint task | |
| run: pnpm lint | |
| - name: 🦀 Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| profile: minimal | |
| override: true | |
| - name: 🔨 Install Anvil | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: nightly | |
| - name: 🚀 Launch Anvil | |
| run: | | |
| echo "::add-mask::$ANVIL_FORK_URL" | |
| anvil --fork-url "$ANVIL_FORK_URL" --fork-block-number "$ANVIL_BLOCK_NUMBER" > /tmp/anvil.log 2>&1 & | |
| for i in {1..30}; do | |
| if cast block-number --rpc-url http://127.0.0.1:8545 > /dev/null 2>&1; then | |
| echo "Anvil is ready" | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "Anvil failed to start" | |
| python - <<'PY' | |
| import os | |
| from pathlib import Path | |
| log = Path('/tmp/anvil.log') | |
| text = log.read_text(errors='replace') if log.exists() else '' | |
| url = os.environ.get('ANVIL_FORK_URL', '') | |
| if url: | |
| text = text.replace(url, '[REDACTED_RPC_URL]') | |
| print(text) | |
| PY | |
| exit 1 | |
| - name: 👾 Run test task | |
| run: pnpm test | |
| # Need to shutdown Anvil so cache gets created | |
| - name: 💤 Shutdown Anvil | |
| run: pkill -2 anvil |