Skip to content

Commit

Permalink
run rethnet forking tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Feb 14, 2023
1 parent 79afbfb commit d759483
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/hardhat-network-forking-rethnet-ci.yml
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

0 comments on commit d759483

Please sign in to comment.