ci: run hardhat tests in github actions #2
Workflow file for this run
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: Test | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Install dependenciess | |
run: pnpm install --frozen-lockfile | |
- name: Start Hardhat node, Run Tests, and Shutdown Hardhat node | |
run: | | |
npx hardhat node & | |
HARDHAT_PID=$! | |
sleep 5 # Wait for Hardhat node to be fully up and running | |
pnpm test | |
kill $HARDHAT_PID |