-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.59 KB
/
join-testnet.yml
File metadata and controls
51 lines (49 loc) · 1.59 KB
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
---
name: Join Enoki Testnet
on:
workflow_dispatch:
schedule:
# At 14:30 on Tuesday and Thursday.
- cron: '30 14 * * 2,4'
pull_request:
paths:
- testnet/join-enoki.sh
- .github/workflows/join-testnet.yml
jobs:
test-sync:
runs-on: ubuntu-22.04
env:
RPC_ENDPOINT: https://rpc.sentry-01.enoki.polypore.xyz
steps:
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ansible toml
- name: Run testnet script
run: |
testnet/join-enoki.sh
- name: Check sync status
run: |
sleep 3m
echo "> Node log:"
journalctl -u enokid | tail -n 100
echo "> enokid service status:"
systemctl status enokid
echo "> Sync status:"
curl -s http://127.0.0.1:26657/status | jq -r '.result.sync_info'
chain_height=$(curl -s $RPC_ENDPOINT/block | jq -r '.result.block.header.height')
node_height=$(curl -s http://127.0.0.1:26657/block | jq -r '.result.block.header.height')
echo "> Chain height: $chain_height"
echo "> Node height: $node_height"
if [ "$chain_height" -ne "$node_height" ]; then
echo "Node is not synced with the testnet."
exit 1
fi