Skip to content

Make flatten task smarter #2079

Make flatten task smarter

Make flatten task smarter #2079

name: Hardhat Network Forking Functionality CI
on:
push:
branches: [$default-branch]
paths:
- "packages/hardhat-core/**"
- "packages/hardhat-common/**"
- "config/**"
pull_request:
branches:
- "**"
paths:
- "packages/hardhat-core/**"
- "packages/hardhat-common/**"
- "config/**"
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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
- name: Install
run: yarn --frozen-lockfile
- name: Cache network requests
uses: actions/cache@v2
with:
path: |
packages/hardhat-core/test/internal/hardhat-network/provider/.hardhat_node_test_cache
key: hardhat-network-forking-tests-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/hardhat-core/test/internal/hardhat-network/provider/node.ts') }}
- 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
run: |
yarn build
yarn test:forking