-
Notifications
You must be signed in to change notification settings - Fork 7
80 lines (75 loc) · 2.42 KB
/
start-stop-network-test-configs.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
name: start-stop network test
on:
pull_request:
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
permissions:
contents: read
jobs:
config:
strategy:
matrix:
settings:
# example:
# - config_file: example_config.hcl
# propose_upgrade: true
- config_file: config.hcl
- config_file: config_clef.hcl
- config_file: config_external_postgres.hcl
- config_file: config_visor_mixed.hcl
propose_upgrade: true
- config_file: config_data_node_snapshot.hcl
# TODO: Needs to be fixed. Issue: https://github.com/vegaprotocol/vegacapsule/issues/291
# - config_visor_only.hcl
name: ${{ matrix.settings.config_file }}
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.5'
- uses: actions/checkout@v3
- name: Build binary
env:
GO111MODULE: on
run: go build -o vegacapsule .
- name: Start nomad
run: |
export GOBIN=$(go env GOPATH)/bin
./vegacapsule nomad&
- name: Wait for nomad
uses: cygnetdigital/wait_for_response@v2.0.0
with:
url: 'http://localhost:4646/ui/'
responseCode: '200,302,307'
timeout: 30000
interval: 1000
- name: Start the node
run: |
export GOBIN=$(go env GOPATH)/bin
export PATH=$GOBIN:$PATH
./vegacapsule install-bins --install-path $GOBIN
./vegacapsule network bootstrap --config-path ./net_confs/${{ matrix.settings.config_file }} ;
sleep 5;
- name: List nodes
run: |
export GOBIN=$(go env GOPATH)/bin
export PATH=$GOBIN:$PATH
./vegacapsule nodes ls;
- name: Network propose upgrade
if: ${{ matrix.settings.propose_upgrade }}
run: |
export GOBIN=$(go env GOPATH)/bin
export PATH=$GOBIN:$PATH
# version can be non-existing one, just submit proposal
./vegacapsule nodes protocol-upgrade \
--propose \
--release-tag v99.99.9 \
--template-path "net_confs/node_set_templates/default/visor_run.tmpl" \
--height 5500 \
--force
- name: Network destroy
run: |
export GOBIN=$(go env GOPATH)/bin
export PATH=$GOBIN:$PATH
./vegacapsule network destroy;