From 38dcaddd88f64306e701c05366b6c33336aeb8d4 Mon Sep 17 00:00:00 2001 From: Rajiv Shah Date: Tue, 10 Jan 2023 04:00:37 -0500 Subject: [PATCH] Wallet tester workflow improvements (#1718) * Wallet tester workflow improvements * Avoid printing image pull progress --- .github/actions/private-tangle/setup/action.yml | 13 +++++++++---- .github/actions/private-tangle/tear-down/action.yml | 6 ++---- .github/workflows/tester.yml | 2 ++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/actions/private-tangle/setup/action.yml b/.github/actions/private-tangle/setup/action.yml index 749b04adb..6156c78d4 100644 --- a/.github/actions/private-tangle/setup/action.yml +++ b/.github/actions/private-tangle/setup/action.yml @@ -3,7 +3,12 @@ description: 'Setup a private tangle' runs: using: "composite" steps: - - uses: mikefarah/yq@master + - name: Clone private tangle files + uses: actions/checkout@v3 + with: + repository: iotaledger/hornet + path: hornet + - name: Setup private tangle shell: bash run: | @@ -17,8 +22,6 @@ runs: # curl -L -o private_tangle.tar.gz $DOWNLOAD_URL # tar -xf private_tangle.tar.gz # TODO: remove next lines when a working hornet release is published - git clone https://github.com/iotaledger/hornet.git - cd hornet/private_tangle # Set protocol_parameters to the same values as in the shimmer network jq '.tokenSupply="1813620509061365" | .rentStructure.vByteCost=100' protocol_parameters.json > tmp.json && mv tmp.json protocol_parameters.json jq --color-output . protocol_parameters.json @@ -29,7 +32,9 @@ runs: # Start Tangle sudo ./cleanup.sh sudo ./bootstrap.sh - sudo ./run.sh -d + sudo ./run.sh -d --quiet-pull + working-directory: hornet/private_tangle + - name: Wait for tangle to start shell: bash run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost:14265/health -- echo "Tangle is up" diff --git a/.github/actions/private-tangle/tear-down/action.yml b/.github/actions/private-tangle/tear-down/action.yml index bfd73f46f..cf4608131 100644 --- a/.github/actions/private-tangle/tear-down/action.yml +++ b/.github/actions/private-tangle/tear-down/action.yml @@ -10,7 +10,5 @@ runs: #cd private_tangle # TODO: remove next line when a working hornet release is published - cd hornet/private_tangle - docker-compose down - cd .. - sudo rm -rf private_tangle + sudo ./cleanup.sh + working-directory: hornet/private_tangle diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml index aad8682d8..bfc3ced8d 100644 --- a/.github/workflows/tester.yml +++ b/.github/workflows/tester.yml @@ -79,9 +79,11 @@ jobs: - name: Run wallet tester uses: actions-rs/cargo@v1 + timeout-minutes: 15 with: command: run args: --manifest-path ./tester/Cargo.toml --all-features --release - name: Tear down private tangle + if: always() uses: './.github/actions/private-tangle/tear-down'