go-ethereum/.github/workflows/build-hardhat-project.yaml
2023-11-15 08:54:48 -05:00

37 lines
No EOL
939 B
YAML

name: Hardhat Deploy and Test
on: [workflow_dispatch]
jobs:
deploy_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.9.0
- name: Run geth devnet
run: docker run --name go-ethereum -p 8545:8545 -p 30303:30303 anglyuboslav/geth --dev --http --http.addr 0.0.0.0
- name: Install dependencies
run: |
cd hardhat
npm install -y
npm install --save-dev hardhat -y
npx hardhat init -y
npm install --save-dev @nomicfoundation/hardhat-toolbox -y
- name: Deploy Hardhat project
run: |
cd hardhat
npx hardhat run scripts/deploy.js --network localhost
- name: Run tests
run: npx hardhat test --network localhost