diff --git a/.github/actions/iota-private-network/setup/action.yml b/.github/actions/iota-private-network/setup/action.yml index a9209a1..7773e7d 100644 --- a/.github/actions/iota-private-network/setup/action.yml +++ b/.github/actions/iota-private-network/setup/action.yml @@ -1,38 +1,25 @@ -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 @@ -40,8 +27,3 @@ runs: 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 diff --git a/.github/actions/iota-private-network/tear-down/action.yml b/.github/actions/iota-private-network/tear-down/action.yml deleted file mode 100644 index 383adf3..0000000 --- a/.github/actions/iota-private-network/tear-down/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: "iota-private-network-tear-down" -description: "tear-down a iota private network" -runs: - using: "composite" - steps: - - name: Tear down iota sandbox - shell: bash - run: | - cd iota/docker/iota-private-network - docker compose down - cd ../.. - sudo rm -rf iota diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 87077c2..48ffc4e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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'