-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Hardhat Network Forking Functionality via Rethnet CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- $default-branch | ||
- "rethnet/main" | ||
paths: | ||
- "packages/hardhat-core/**" | ||
- "packages/hardhat-common/**" | ||
- "config/**" | ||
- ".github/workflows/hardhat-network-forking-rethnet-ci.yml" | ||
- "config/**" | ||
- "crates/**" | ||
- "Cargo.toml" | ||
- "rust-toolchain" | ||
pull_request: | ||
branches: | ||
- "**" | ||
paths: | ||
- ".github/workflows/hardhat-network-forking-rethnet-ci.yml" | ||
- "packages/hardhat-core/**" | ||
- "packages/hardhat-common/**" | ||
- "config/**" | ||
- "crates/**" | ||
- "Cargo.toml" | ||
- "rust-toolchain" | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
|
||
defaults: | ||
run: | ||
working-directory: packages/hardhat-core | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# We should run this tests with multiple configurations | ||
# but somehow the requests to Alchemy take much longer when doing that. | ||
# As a temporary workaround, we run them with a single config. | ||
# | ||
# Once we properly refactor Hardhat Network's tests we should | ||
# add more configurations (different OS and node versions). | ||
# | ||
# We should also understand what's going on before blindly refactoring them. | ||
test_fork: | ||
name: Test Hardhat Network's forking functionality while using the rethnet VM mode | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Rust (stable) | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: yarn | ||
- name: Install | ||
run: yarn --frozen-lockfile | ||
- name: Run tests | ||
env: | ||
INFURA_URL: ${{ secrets.INFURA_URL }} | ||
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }} | ||
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true | ||
FORCE_COLOR: 3 | ||
HARDHAT_EXPERIMENTAL_VM_MODE: rethnet | ||
run: | | ||
yarn build | ||
yarn test:forking |