Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update yaml file to continue execution when any chain fails #125

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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