Skip to content

Commit

Permalink
chore: update iota-private-network setup action and remove tear-down …
Browse files Browse the repository at this point in the history
…action
  • Loading branch information
itsyaasir committed Nov 25, 2024
1 parent a34a187 commit ec79e34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 44 deletions.
42 changes: 12 additions & 30 deletions .github/actions/iota-private-network/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,29 @@
name: "iota-private-network-setup"
description: "Setup IOTA private network sandbox"
name: "iota-private-network setup"
description: "Setup IOTA Sandbox"

runs:
using: composite
steps:
- name: Checkout IOTA repository
uses: actions/checkout@v3
with:
repository: "iotaledger/iota"
ref: "testnet"
path: "iota"

- name: list files
shell: bash
run: |
ls -la iota/docker/iota-private-network
- name: build docker images
- name: Set up IOTA Node
shell: bash
working-directory: iota/docker/iota-private-network
run: |
../iota-node/build.sh -t iota-node --no-cache
../iota-indexer/build.sh -t iota-indexer --no-cache
../iota-tools/build.sh -t iota-tools --no-cache
mkdir -p iota
cd iota
# Use the output of https://api.github.com/repos/iotaledger/iota/releases/latest
- name: Bootstrap the network
shell: bash
run: ./bootstrap.sh
working-directory: iota/docker/iota-private-network
DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota/releases" | jq -r '.[0].assets[] | select(.name | contains("iota") and contains("linux")) | .browser_download_url')
# Download and extract
curl -L -o iota.tar.gz $DOWNLOAD_URL
tar -xzf iota.tar.gz
- name: Start the Network
shell: bash
run: ./run.sh faucet
working-directory: iota/docker/iota-private-network
working-directory: iota
run: iota start --with-faucet --force-regenesis

- name: Wait for iota network to start
shell: bash
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:9000 -- echo "IOTA full node is up"
env:
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3

- name: Wait for faucet to start
shell: bash
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:5003 -- echo "Faucet is up"
env:
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3
12 changes: 0 additions & 12 deletions .github/actions/iota-private-network/tear-down/action.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ jobs:
uses: './.github/actions/iota-private-network/setup'
- name: Run tests
run: cargo test --release
- name: Stop iota sandbox
uses: './.github/actions/iota-private-network/tear-down'

0 comments on commit ec79e34

Please sign in to comment.