From 56f355a48f268d2335325f5373e226a79cf37647 Mon Sep 17 00:00:00 2001 From: Nodar Ambroladze Date: Fri, 9 Feb 2024 15:43:48 +0100 Subject: [PATCH] Startup nitro-testnode in release CI --- .github/workflows/release-ci.yml | 3 +++ scripts/startup-testnode.bash | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 scripts/startup-testnode.bash diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 036bf46538..1084d1f8b3 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -25,3 +25,6 @@ jobs: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }} restore-keys: ${{ runner.os }}-buildx- + + - name: Startup Nitro testnode + run: .scripts/startup-testnode.bash diff --git a/scripts/startup-testnode.bash b/scripts/startup-testnode.bash new file mode 100755 index 0000000000..701e7ff59a --- /dev/null +++ b/scripts/startup-testnode.bash @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# The script starts up the test node (with timeout 1 minute), to make sure the +# nitro-testnode script isn't out of sync with flags with nitro. +# This is used in CI, basically as smoke test. + +timeout 60 ./nitro-testnode/test-node.bash --init --dev || exit_status=$? + +if [ -n "$exit_status" ] && [ $exit_status -ne 0 ] && [ $exit_status -ne 124 ]; then + echo "Startup failed." + exit $exit_status +fi + +echo "Startup succeeded."