mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
35 lines
910 B
YAML
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
|
|
|