-
Notifications
You must be signed in to change notification settings - Fork 53
150 lines (134 loc) · 5.15 KB
/
nightly_wan_churn.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Nightly -- Perform long running network churn
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0 # bookkeeping for incremental builds has overhead, not useful in CI.
WORKFLOW_URL: https://github.com/maidsafe/stableset_net/actions/runs
jobs:
e2e:
name: E2E
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
continue-on-error: true
- name: Build safe
run: cargo build --release --bin safe
timeout-minutes: 30
- name: Start a WAN network
uses: maidsafe/sn-testnet-action@main
with:
action: create
re-attempts: 3
rust-log: debug
ansible-vault-password: ${{ secrets.SN_TESTNET_ANSIBLE_VAULT_PASSWORD }}
aws-access-key-id: ${{ secrets.SN_TESTNET_AWS_ACCESS_KEY_ID }}
aws-access-key-secret: ${{ secrets.SN_TESTNET_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
do-token: ${{ secrets.SN_TESTNET_DO_PAT }}
ssh-secret-key: ${{ secrets.SN_TESTNET_SSH_KEY }}
security-group-id: sg-0d47df5b3f0d01e2a
subnet-id: subnet-018f2ab26755df7f9
node-count: 20
vm-count: 5
testnet-name: NightlyChurnE2E
public-rpc: true
safe-network-user: maidsafe
safe-network-branch: main
- name: Download material, 1.6G
shell: bash
run: |
wget https://releases.ubuntu.com/16.04/ubuntu-16.04.7-desktop-amd64.iso
ls -l
- name: Check env variables
shell: bash
run: |
echo "Peer is $SAFE_PEERS"
echo "Deployment inventory is $SN_INVENTORY"
- name: Obtain the funds from the faucet
run: |
# read the inventory file
inventory_path=/home/runner/.local/share/safe/testnet-deploy/NightlyChurnE2E-inventory.json
echo "Inventory Path: $inventory_path"
faucet_address=$(jq -r '.faucet_address' $inventory_path)
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
cargo run --bin safe --release -- wallet get-faucet ${faucet_address}
env:
SN_LOG: "all"
timeout-minutes: 2
- name: Start a client to upload
run: cargo run --bin safe -- --log-output-dest=data-dir files upload "ubuntu-16.04.7-desktop-amd64.iso" --retry-strategy quick
env:
SN_LOG: "all"
timeout-minutes: 45
- name: Cause random churn
uses: maidsafe/sn-testnet-action/network_commands@main
with:
action: churn-random
testnet-name: NightlyChurnE2E
churn-cycles: 3
retain-peer-id: false
random-churn-time-frame: 60
random-churn-count: 5
- name: Start a client to download files
run: cargo run --bin safe --release -- --log-output-dest=data-dir files download --retry-strategy quick
env:
SN_LOG: "all"
timeout-minutes: 30
- name: Fetch network logs
if: always()
uses: maidsafe/sn-testnet-action@main
with:
action: logs
re-attempts: 3
rust-log: debug
ansible-vault-password: ${{ secrets.SN_TESTNET_ANSIBLE_VAULT_PASSWORD }}
aws-access-key-id: ${{ secrets.SN_TESTNET_AWS_ACCESS_KEY_ID }}
aws-access-key-secret: ${{ secrets.SN_TESTNET_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
do-token: ${{ secrets.SN_TESTNET_DO_PAT }}
ssh-secret-key: ${{ secrets.SN_TESTNET_SSH_KEY }}
node-count: 20
vm-count: 1
provider: digital-ocean
testnet-name: NightlyChurnE2E
safe-network-user: maidsafe
safe-network-branch: main
- name: Upload local logs
if: always()
uses: actions/upload-artifact@v4
with:
name: local_logs_NightlyChurnE2E
path: |
~/.local/share/safe/node/*/logs/*.log*
~/.local/share/safe/*/*/*.log*
~/.local/share/safe/autonomi/logs/*/*.log*
- name: Stop the WAN network
if: always()
uses: maidsafe/sn-testnet-action@main
with:
action: destroy
re-attempts: 3
rust-log: debug
ansible-vault-password: ${{ secrets.SN_TESTNET_ANSIBLE_VAULT_PASSWORD }}
aws-access-key-id: ${{ secrets.SN_TESTNET_AWS_ACCESS_KEY_ID }}
aws-access-key-secret: ${{ secrets.SN_TESTNET_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
do-token: ${{ secrets.SN_TESTNET_DO_PAT }}
ssh-secret-key: ${{ secrets.SN_TESTNET_SSH_KEY }}
node-count: 20
vm-count: 1
provider: digital-ocean
testnet-name: NightlyChurnE2E
safe-network-user: maidsafe
safe-network-branch: main