diff --git a/.github/workflows/foundry.yml b/.github/workflows/foundry.yml index 05571cba..4c9bca45 100644 --- a/.github/workflows/foundry.yml +++ b/.github/workflows/foundry.yml @@ -105,7 +105,7 @@ jobs: - uses: ./.github/actions/install-cache - name: Run local tests on chain ${{ matrix.chain }} in ${{ matrix.type }} mode - run: yarn test:forge:local + run: yarn test:forge:local --chain matrix.chain env: FOUNDRY_FUZZ_RUNS: ${{ matrix.fuzz-runs }} FOUNDRY_FUZZ_MAX_TEST_REJECTS: ${{ matrix.max-test-rejects }} diff --git a/test/forge/fork/helpers/ForkTest.sol b/test/forge/fork/helpers/ForkTest.sol index f8f6ba5c..01865421 100644 --- a/test/forge/fork/helpers/ForkTest.sol +++ b/test/forge/fork/helpers/ForkTest.sol @@ -27,8 +27,8 @@ abstract contract ForkTest is CommonTest, Configured { MarketParams[] allMarketParams; function setUp() public virtual override { - // Run fork tests on Ethereum by default. - if (block.chainid == 31337) vm.chainId(1); + require(block.chainid != 31337, "Fork tests must be run on Ethereum (`--chain 1`) or Base (`--chain 8453`)."); + require(block.chainid == 1 || block.chainid == 8453, "Unsupported chain."); _loadConfig();