Skip to content

fix(kicker init): remove rust target to avoid out of disk issue in CI #502

fix(kicker init): remove rust target to avoid out of disk issue in CI

fix(kicker init): remove rust target to avoid out of disk issue in CI #502

# This workflow simulates the steps described in `docs/hardhat-simple-project.md`.
# Code authors should ensure the workflow follows this tutorial document.
name: Simple Test
on:
push:
branches: [develop, master, ci, 'v1*', compatibility-changes]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
jobs:
hardhat-simple-project:
runs-on: ubuntu-latest
steps:
- run: echo "Part 1. Deploy Local Network of Godwoken"
- name: Checkout Godwoken-Kicker
uses: actions/checkout@v3
- run: git rev-parse HEAD
- run: ./kicker init
- name: Kicker start
run: |
# Temporary workaround unreliable web3 health check
(echo " == kicker start attempt: 1 == " && ./kicker start) || \
(echo " == kicker start attempt: 2 == " && ./kicker stop && ./kicker start) || \
(echo " == kicker start failed == " && docker-compose --file docker/docker-compose.yml logs --tail 6 && exit 1)
docker-compose --file docker/docker-compose.yml logs --tail 6
- run: ./kicker info
- run: ./kicker ps
- run: ./kicker ps web3
- run: ./kicker logs
- run: ./kicker logs web3
- run: ./kicker -- top
- run: ./kicker -- exec -i ckb ls -l
- run: ./kicker -- --help
- run: ./kicker deposit 0xCD1d13450cFA630728D0390C99957C6948BF7d19 10000
- run: echo "Part 2. Deploy A Simple Contract Using Hardhat"
- run: |
git clone -b hardhat@2.9.9 --depth=1 https://github.com/NomicFoundation/hardhat
mv hardhat/packages/hardhat-core/sample-projects/basic .
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-
- name: Install hardhat
working-directory: basic
run: |
npm install --save-dev hardhat @nomiclabs/hardhat-waffle chai
npx hardhat --version
- name: Adapt hardhat.config.js to our local network of Godwoken
run: |
sed -i 's#solidity:# networks: { gw_devnet_v1: { url: `http://127.0.0.1:8024/instant-finality-hack`, accounts: [`0x9d5bc55413c14cf4ce360a6051eacdc0e580100a0d3f7f2f48f63623f6b05361`], } }, solidity:#g' hardhat.config.js
cat hardhat.config.js
working-directory: basic
- run: npx hardhat accounts --network gw_devnet_v1
working-directory: basic
- run: npx hardhat compile
working-directory: basic
- run: npx hardhat test --network gw_devnet_v1
working-directory: basic
- run: npx hardhat run --network gw_devnet_v1 scripts/sample-script.js
working-directory: basic
- run: echo "Part3. Clean Up"
- run: ./kicker stop
- run: sudo ./kicker clean
- run: ./kicker ps