feat: add configurable predeploys #882
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
name: Run Hardhat tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
jobs: | |
run-hardhat-tests: | |
name: Run Hardhat tests (${{ matrix.os }}, Node ${{ matrix.node }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [20] | |
os: ["macos-latest", "ubuntu-latest", "windows-latest"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-node | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: ./.github/actions/setup-rust | |
- name: Install package | |
run: pnpm install --frozen-lockfile --prefer-offline | |
- name: Cache network requests | |
uses: actions/cache@v2 | |
with: | |
path: | | |
hardhat-tests/test/internal/hardhat-network/provider/.hardhat_node_test_cache | |
key: hardhat-network-forking-tests-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Cache stack trace artifacts | |
uses: actions/cache@v2 | |
with: | |
path: | | |
hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/artifacts | |
key: hardhat-network-stack-traces-tests-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/**/*.sol') }}-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/**/test.json') }}-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/**/*.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 | |
NODE_OPTIONS: --max-old-space-size=4096 | |
DEBUG: "hardhat:core:hardhat-network:*" | |
run: cd hardhat-tests && pnpm test:ci | |
lint-hardhat-tests: | |
name: Lint Hardhat tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-node | |
- name: Install package | |
run: pnpm install --frozen-lockfile --prefer-offline | |
- name: Build and lint | |
run: cd hardhat-tests && pnpm lint |