From 1d9aea8218cca8233412522b4dc30b83682852a9 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Tue, 28 Nov 2023 17:41:00 +0530 Subject: [PATCH] test: create a list to add all failed chains and print it --- .github/workflows/local.yaml | 13 +++++++++++++ .github/workflows/mainnet.yaml | 13 +++++++++++++ .github/workflows/testnet.yaml | 14 ++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/.github/workflows/local.yaml b/.github/workflows/local.yaml index d0de528..58a2f02 100644 --- a/.github/workflows/local.yaml +++ b/.github/workflows/local.yaml @@ -20,6 +20,10 @@ jobs: - name: Starting the Kurtosis engine run: kurtosis engine start + - name: Set up variables + run: | + failed_chains=() + - name: Read CSV and loop over items run: | # Read CSV file and extract values @@ -33,10 +37,19 @@ jobs: # Check if Kurtosis command failed if [ $? -ne 0 ]; then echo "Chain $para_chain failed." + failed_chains+=("$para_chain") else echo "Chain $para_chain succeeded." fi done < ./testdata/chain_value.csv + + - name: Print failed chains + run: | + if [ ${#failed_chains[@]} -gt 0 ]; then + echo "Failed chains: ${failed_chains[@]}" + else + echo "All chains succeeded." + fi diff --git a/.github/workflows/mainnet.yaml b/.github/workflows/mainnet.yaml index c9d077f..92a06de 100644 --- a/.github/workflows/mainnet.yaml +++ b/.github/workflows/mainnet.yaml @@ -20,6 +20,10 @@ jobs: - name: Starting the Kurtosis engine run: kurtosis engine start + - name: Set up variables + run: | + failed_chains=() + - name: Read CSV and loop over items run: | # Read CSV file and extract values @@ -33,10 +37,19 @@ jobs: # Check if Kurtosis command failed if [ $? -ne 0 ]; then echo "Chain $para_chain failed." + failed_chains+=("$para_chain") else echo "Chain $para_chain succeeded." fi done < ./testdata/chain_value.csv + + - name: Print failed chains + run: | + if [ ${#failed_chains[@]} -gt 0 ]; then + echo "Failed chains: ${failed_chains[@]}" + else + echo "All chains succeeded." + fi diff --git a/.github/workflows/testnet.yaml b/.github/workflows/testnet.yaml index d245001..8170821 100644 --- a/.github/workflows/testnet.yaml +++ b/.github/workflows/testnet.yaml @@ -20,6 +20,10 @@ jobs: - name: Starting the Kurtosis engine run: kurtosis engine start + - name: Set up variables + run: | + failed_chains=() + - name: Read CSV and loop over items run: | # Read CSV file and extract values @@ -33,10 +37,20 @@ jobs: # Check if Kurtosis command failed if [ $? -ne 0 ]; then echo "Chain $para_chain failed." + failed_chains+=("$para_chain") else echo "Chain $para_chain succeeded." fi done < ./testdata/chain_value.csv + + + - name: Print failed chains + run: | + if [ ${#failed_chains[@]} -gt 0 ]; then + echo "Failed chains: ${failed_chains[@]}" + else + echo "All chains succeeded." + fi