mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
test
This commit is contained in:
parent
e4ffed9999
commit
06a554a772
1 changed files with 12 additions and 17 deletions
29
.github/workflows/docker-deploy.yml
vendored
29
.github/workflows/docker-deploy.yml
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
name: deploy-hardhat
|
name: deploy-hardhat
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
|
@ -38,6 +38,7 @@ jobs:
|
||||||
|
|
||||||
- name: Running image container
|
- name: Running image container
|
||||||
run: |
|
run: |
|
||||||
|
echo "Workspace path: /workspace/hardhat"
|
||||||
docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||||
--dev \
|
--dev \
|
||||||
--http \
|
--http \
|
||||||
|
|
@ -51,36 +52,29 @@ jobs:
|
||||||
--ws.origins "*" \
|
--ws.origins "*" \
|
||||||
--ws.api personal,db,eth,net,web3
|
--ws.api personal,db,eth,net,web3
|
||||||
|
|
||||||
- name: Wait for the Ethereum node to be ready
|
|
||||||
run: sleep 15
|
|
||||||
|
|
||||||
- name: Copying the hardhat files to the container
|
- name: Copying the hardhat files to the container
|
||||||
run: |
|
run: |
|
||||||
docker exec go-ethereum mkdir -p /workspace/hardhat
|
docker exec go-ethereum mkdir -p /workspace/hardhat
|
||||||
docker cp ${{ github.workspace }}/hardhat/. go-ethereum:/workspace/hardhat
|
docker cp ${{ github.workspace }}/hardhat go-ethereum:/workspace/hardhat
|
||||||
docker exec go-ethereum ls -larth /workspace/hardhat
|
docker exec go-ethereum ls -larth /workspace/hardhat
|
||||||
|
|
||||||
- name: Installing the required Node.js and npm
|
- name: Installing the required Node.js and npm
|
||||||
run: |
|
run: |
|
||||||
docker exec go-ethereum apk add --no-cache nodejs npm
|
docker exec go-ethereum apk add --no-cache nodejs npm
|
||||||
|
|
||||||
- name: Installing hardhat dependencies
|
- name: Installation of hardhat
|
||||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npm install"
|
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npm install --save-dev hardhat && npm install ethers@5"
|
||||||
|
|
||||||
- name: Installation of hardhat plugins
|
- name: Checking the hardhat version to verify that its working properly
|
||||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai"
|
|
||||||
|
|
||||||
- name: Checking the hardhat version to verify that it's working properly
|
|
||||||
run: docker exec go-ethereum npx hardhat --version
|
run: docker exec go-ethereum npx hardhat --version
|
||||||
|
|
||||||
- name: Verify Hardhat project
|
|
||||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && ls -larth && cat hardhat.config.js"
|
|
||||||
|
|
||||||
- name: Deploy hardhat sample project
|
- name: Deploy hardhat sample project
|
||||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npx hardhat ignition deploy ./ignition/modules/Token.js --network devnet"
|
run: |
|
||||||
|
docker exec go-ethereum sh -c "cd /workspace/hardhat && yes | npx hardhat ignition deploy ./ignition/modules/Token.js --network devnet"
|
||||||
|
|
||||||
- name: Testing contracts
|
- name: Testing contracts
|
||||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npx hardhat test"
|
run: |
|
||||||
|
docker exec go-ethereum sh -c "cd /workspace/hardhat && npx hardhat test"
|
||||||
|
|
||||||
- name: Build a new docker image
|
- name: Build a new docker image
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -89,3 +83,4 @@ jobs:
|
||||||
|
|
||||||
- name: Push new image to ghcr.io
|
- name: Push new image to ghcr.io
|
||||||
run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest
|
run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue