From 22f3119f80042e8e105f5d560d033e5599564ece Mon Sep 17 00:00:00 2001 From: hemz10 Date: Tue, 28 Nov 2023 17:37:24 +0530 Subject: [PATCH 1/3] test: update chain name in csv to match the dict --- testdata/chain_value.csv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testdata/chain_value.csv b/testdata/chain_value.csv index 4229037..7ded96a 100644 --- a/testdata/chain_value.csv +++ b/testdata/chain_value.csv @@ -2,9 +2,9 @@ acala,Polkadot bifrost,Polkadot clover,Polkadot integritee,Polkadot -kilt-spiritnet,Polkadot -litentry,Polkadot +kilt,Polkadot moonbeam,Polkadot +litentry,Polkadot nodle,Polkadot pendulum,Polkadot polkadex,Polkadot @@ -25,11 +25,11 @@ manta,Polkadot moonsama,Polkadot parallel,Polkadot subsocial,Polkadot -encointer-network,Kusama +encointer,Kusama bajun,Kusama -khala network,Kusama +khala,Kusama subzero,Kusama litmus,Kusama moonriver,Kusama calamari,Kusama -phala-network,Polkadot \ No newline at end of file +phala,Polkadot \ No newline at end of file From 5487f33e43a06c6da2b91ed5b3454816415eab82 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Tue, 28 Nov 2023 17:37:58 +0530 Subject: [PATCH 2/3] update yaml to continue execution if command fails --- .github/workflows/local.yaml | 9 ++++++++- .github/workflows/mainnet.yaml | 9 ++++++++- .github/workflows/testnet.yaml | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/local.yaml b/.github/workflows/local.yaml index f11513d..d0de528 100644 --- a/.github/workflows/local.yaml +++ b/.github/workflows/local.yaml @@ -28,7 +28,14 @@ jobs: echo "Processing para chain: $para_chain, relay chain: $relay_chain" # Call Python script with para_chain and relay_chain as arguments python ./testdata/generate_json.py --relay "$relay_chain" --para "$para_chain" --network "local" - kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot + kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot || true + + # Check if Kurtosis command failed + if [ $? -ne 0 ]; then + echo "Chain $para_chain failed." + else + echo "Chain $para_chain succeeded." + fi done < ./testdata/chain_value.csv diff --git a/.github/workflows/mainnet.yaml b/.github/workflows/mainnet.yaml index 1e6f9da..c9d077f 100644 --- a/.github/workflows/mainnet.yaml +++ b/.github/workflows/mainnet.yaml @@ -28,7 +28,14 @@ jobs: echo "Processing para chain: $para_chain, relay chain: $relay_chain" # Call Python script with para_chain and relay_chain as arguments python ./testdata/generate_json.py --relay "$relay_chain" --para "$para_chain" --network "mainnet" - kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot + kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot || true + + # Check if Kurtosis command failed + if [ $? -ne 0 ]; then + echo "Chain $para_chain failed." + else + echo "Chain $para_chain succeeded." + fi done < ./testdata/chain_value.csv diff --git a/.github/workflows/testnet.yaml b/.github/workflows/testnet.yaml index 4699262..d245001 100644 --- a/.github/workflows/testnet.yaml +++ b/.github/workflows/testnet.yaml @@ -28,7 +28,14 @@ jobs: echo "Processing para chain: $para_chain, relay chain: $relay_chain" # Call Python script with para_chain and relay_chain as arguments python ./testdata/generate_json.py --relay "$relay_chain" --para "$para_chain" --network "testnet" - kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot + kurtosis run . --args-file ./testdata/updated_config.json --enclave polkadot || true + + # Check if Kurtosis command failed + if [ $? -ne 0 ]; then + echo "Chain $para_chain failed." + else + echo "Chain $para_chain succeeded." + fi done < ./testdata/chain_value.csv From 1d9aea8218cca8233412522b4dc30b83682852a9 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Tue, 28 Nov 2023 17:41:00 +0530 Subject: [PATCH 3/3] 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