-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (44 loc) · 1.98 KB
/
mainnet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: mainnet
on:
workflow_dispatch:
jobs:
mainnet:
name: test all parachains run on mainnet
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Installing Kurtosis CLI if not found in cache
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli
- 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
while IFS=',' read -r para_chain relay_chain; do
kurtosis clean -a
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 || 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