From 05930fce7f5c198cbfb1e849fb0f308694711307 Mon Sep 17 00:00:00 2001 From: Andrei <122784628+andrei-near@users.noreply.github.com> Date: Thu, 26 Sep 2024 08:46:49 +0300 Subject: [PATCH] jq --- .github/workflows/nayduck_ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nayduck_ci.yml b/.github/workflows/nayduck_ci.yml index fae5866efb8..c22c64cee08 100644 --- a/.github/workflows/nayduck_ci.yml +++ b/.github/workflows/nayduck_ci.yml @@ -27,7 +27,6 @@ jobs: - name: Run Nayduck tests and wait for results run: | - set -x NEW_TEST=$(python3 ./scripts/nayduck.py --test-file nightly/ci.txt) RUN_ID="$(echo $NEW_TEST | grep https | sed -E 's|.*\/run\/([0-9]+)|\1|' | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')" URL="https://nayduck.nearone.org/api/run/$RUN_ID" @@ -36,13 +35,13 @@ jobs: # wait all the tests to finish while true; do TEST_RESULTS=$(curl -s https://nayduck.nearone.org/api/run/$RUN_ID) - TESTS_NOT_READY=$( jq -e '.tests | .[] | select(.status == "RUNNING" or .status == "PENDING" ) ' <<< ${TEST_RESULTS} ) + TESTS_NOT_READY=$(jq '.tests | .[] | select(.status == "RUNNING" or .status == "PENDING") ' <<< ${TEST_RESULTS} ) if [ -z "$TESTS_NOT_READY" ]; then break; fi echo "Tests are not ready yet. Waiting for 15 seconds..." sleep 15 done - UNSUCCESSFUL_TESTS=$(jq -e '.tests | .[] | select(.status != "PASSED" and .status != "IGNORED") ' <<< ${TEST_RESULTS} ) + UNSUCCESSFUL_TESTS=$(jq '.tests | .[] | select(.status != "PASSED" and .status != "IGNORED") ' <<< ${TEST_RESULTS} ) if [ -z "$UNSUCCESSFUL_TESTS" ]; then echo "Nayduck CI tests passed." echo "Results available at https://nayduck.nearone.org/#/run/$RUN_ID"