Skip to content

Commit

Permalink
Merge pull request #125 from HugoByte/DIVE-313-Testing-KILT-Spiritnet…
Browse files Browse the repository at this point in the history
…-Polkadot

test: update yaml file to continue execution when any chain fails
  • Loading branch information
Mr-Nobody21 authored Nov 28, 2023
2 parents c83e633 + 1d9aea8 commit 76fcc8e
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 8 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,8 +32,24 @@ 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."
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

Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,8 +32,24 @@ 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."
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

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,8 +32,25 @@ 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."
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

Expand Down
10 changes: 5 additions & 5 deletions testdata/chain_value.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
phala,Polkadot

0 comments on commit 76fcc8e

Please sign in to comment.