Skip to content

Remove unnecessary network-specific instanciation #911

Remove unnecessary network-specific instanciation

Remove unnecessary network-specific instanciation #911

Workflow file for this run

name: Foundry
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build-via-ir:
name: Compilation (via IR)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/install
- name: Build contracts via IR & check sizes
run: yarn build:forge --force --sizes # don't use compilation cache
build-no-ir:
name: Compilation (without IR)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/install-cache
- name: Build contracts without IR
run: yarn build:forge
env:
FOUNDRY_PROFILE: test
- name: Save forge compilation cache
uses: actions/cache/save@v3
with:
path: |
cache
out
key: forge-${{ github.ref_name }}
test-local:
needs: build-no-ir
name: Local tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
type: ["slow", "fast"]
include:
- type: "slow"
fuzz-runs: 25000
max-test-rejects: 10000
- type: "fast"
fuzz-runs: 2048
max-test-rejects: 65536
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/install-cache
- name: Run local tests in ${{ matrix.type }} mode
run: yarn test:forge:local
env:
FOUNDRY_FUZZ_RUNS: ${{ matrix.fuzz-runs }}
FOUNDRY_FUZZ_MAX_TEST_REJECTS: ${{ matrix.max-test-rejects }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
test-ethereum:
needs: build-no-ir
name: Ethereum tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
type: ["slow", "fast"]
include:
- type: "slow"
fuzz-runs: 96
max-test-rejects: 65536
- type: "fast"
fuzz-runs: 16
max-test-rejects: 65536
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/install-cache
- name: Run ethereum tests in ${{ matrix.type }} mode
run: yarn test:forge:ethereum
env:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_FUZZ_RUNS: ${{ matrix.fuzz-runs }}
FOUNDRY_FUZZ_MAX_TEST_REJECTS: ${{ matrix.max-test-rejects }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}