Skip to content

Commit

Permalink
test: simplify chain setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Oct 28, 2024
1 parent b24c564 commit eb7b22b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions test/forge/fork/helpers/ForkTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit eb7b22b

Please sign in to comment.