Skip to content

fix(ci): exclued miannet run - Invariants test #14

fix(ci): exclued miannet run - Invariants test

fix(ci): exclued miannet run - Invariants test #14

Workflow file for this run

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
name: CI
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
unit:
name: Unit Tests & Reports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
cache: true
- name: Format Check
run: forge fmt --check
- name: Build with Sizes
run: forge build --sizes
- name: Run Unit Tests
run: forge test -vvv
- name: Gas Snapshot
run: forge snapshot --check --tolerance 5 --no-match-contract "VaultInvariants"
- name: Coverage Report
run: forge coverage --report lcov
invariants:
name: Invariant Fuzz Tests
runs-on: ubuntu-latest
needs: unit
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
cache: true
- name: Run Invariant Tests
env:
ETH_RPC_URL:
RPC_URL:
ALCHEMY_MAINNET:
ALCHEMY_SEPOLIA:
run: forge test --mt invariant -vvv
fork:
name: Fork Tests (Mainnet + Sepolia)
runs-on: ubuntu-latest
needs: unit # Only run if unit passes
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
cache: true
- name: Run Mainnet Fork Tests
run: forge test --fork-url ${{ secrets.ALCHEMY_MAINNET }} -vvv
- name: Run Sepolia Fork Tests
run: forge test --fork-url ${{ secrets.ALCHEMY_SEPOLIA }} -vvv