go-ethereum/.github/workflows/build-hardhat-project.yaml
2023-11-15 16:01:40 +02:00

35 lines
910 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 -d 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
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