Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .github/workflows/solidity_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

test-core:
name: solidity test core
runs-on: ubuntu-latest
runs-on: ubuntu-latest-16core
needs: detect-changes
if: needs.detect-changes.outputs.changed == 'true'
env:
Expand All @@ -34,8 +34,8 @@ jobs:
run: FOUNDRY_FUZZ_RUNS=10000 make test-sol-core

test-heavy:
name: solidity test heavy
runs-on: ubuntu-latest
name: solidity test lp withdrawal
runs-on: ubuntu-latest-16core
needs: detect-changes
if: needs.detect-changes.outputs.changed == 'true'
env:
Expand All @@ -53,11 +53,11 @@ jobs:
version: nightly

- name: test
run: FOUNDRY_FUZZ_RUNS=10000 make test-sol-heavy
run: FOUNDRY_FUZZ_RUNS=10000 make test-sol-lp-withdrawal

test-netting:
name: solidity test netting
runs-on: ubuntu-latest
runs-on: ubuntu-latest-16core
needs: detect-changes
if: needs.detect-changes.outputs.changed == 'true'
env:
Expand All @@ -76,3 +76,25 @@ jobs:

- name: test
run: FOUNDRY_FUZZ_RUNS=10000 make test-sol-netting

test-zombie:
name: solidity test zombie
runs-on: ubuntu-latest-16core
needs: detect-changes
if: needs.detect-changes.outputs.changed == 'true'
env:
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

- name: install foundry
uses: foundry-rs/foundry-toolchain@v1.0.10
with:
version: nightly

- name: test
run: FOUNDRY_FUZZ_RUNS=1000 make test-sol-zombie
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ build-rust:

### Test ###

SOLIDITY_HEAVY_TESTS = LPWithdrawalTest|ZombieInterestTest
SOLIDITY_LP_WITHDRAWAL_TESTS = LPWithdrawalTest
SOLIDITY_NETTING_TESTS = IntraCheckpointNettingTest
SOLIDITY_ZOMBIE_TESTS = ZombieInterestTest

test:
make test-sol && make test-rust

test-sol-core:
forge test -vv --no-match-contract "$(SOLIDITY_HEAVY_TESTS)|$(SOLIDITY_NETTING_TESTS)"
forge test -vv --no-match-contract "$(SOLIDITY_LP_WITHDRAWAL_TESTS)|$(SOLIDITY_NETTING_TESTS)|$(SOLIDITY_ZOMBIE_TESTS)"

# This job runs the heavier fuzz tests. Breaking these out onto a separate
# machine speeds up CI execution.
test-sol-heavy:
forge test -vv --match-contract "$(SOLIDITY_HEAVY_TESTS)"
# NOTE: Breaking these out onto a separate machine speeds up CI execution.
test-sol-lp-withdrawal:
forge test -vv --match-contract "$(SOLIDITY_LP_WITHDRAWAL_TESTS)"

# This job runs the netting tests.
# NOTE: Breaking these out onto a separate machine speeds up CI execution.
test-sol-netting:
forge test -vv --match-contract "$(SOLIDITY_NETTING_TESTS)"

# NOTE: Breaking these out onto a separate machine speeds up CI execution.
test-sol-zombie:
forge test -vv --match-contract "$(SOLIDITY_ZOMBIE_TESTS)"

test-rust:
cargo test --workspace --exclude hyperdrive-math && \
cargo test --package hyperdrive-math -- --test-threads=1
Expand Down