Skip to content

Commit

Permalink
test fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabasco committed May 5, 2024
1 parent 21fef78 commit 932fa69
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-forked.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push]
jobs:
ci:
runs-on: ubuntu-latest
name: Hardhat unit test
name: Hardhat unit test (forked network)
env: # Set environment variables for all steps in this job
GH_TOKEN: ${{ secrets.github_token }}
FORK_TESTING_ENABLED: true
Expand Down
19 changes: 14 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ const config: HardhatUserConfig = {
ssvToken: process.env.SSVTOKEN_ADDRESS, // if empty, deploy SSV mock token
} as SSVNetworkConfig,
hardhat: {
forking: {
enabled: process.env.FORK_TESTING_ENABLED === 'true',
url: process.env.MAINNET_ETH_NODE_URL,
blockNumber: 19621100,
},
allowUnlimitedContractSize: true,
gas: 5000000,
},
Expand Down Expand Up @@ -144,4 +139,18 @@ if (process.env.MAINNET_ETH_NODE_URL) {
};
}

if (process.env.FORK_TESTING_ENABLED) {
config.networks = {
...config.networks,
hardhat: {
...config.networks?.hardhat,
forking: {
enabled: process.env.FORK_TESTING_ENABLED === 'true',
url: process.env.MAINNET_ETH_NODE_URL ? process.env.MAINNET_ETH_NODE_URL : '',
blockNumber: 19621100,
},
},
};
}

export default config;

0 comments on commit 932fa69

Please sign in to comment.