@@ -19,9 +19,6 @@ concurrency:
19
19
group : ${{ github.workflow }}-${{ github.ref }}
20
20
cancel-in-progress : true
21
21
22
- env :
23
- grafana_url : https://grafana-experimental.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7Cava-labs%2Favalanchego&var-filter=gh_run_id%7C%3D%7C${{ github.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ github.run_attempt }}
24
-
25
22
jobs :
26
23
Unit :
27
24
runs-on : ${{ matrix.os }}
@@ -59,49 +56,19 @@ jobs:
59
56
- name : Build AvalancheGo Binary
60
57
shell : bash
61
58
run : ./scripts/build.sh -r
62
- - name : Start prometheus
63
- # Only run for the original repo; a forked repo won't have access to the monitoring credentials
64
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
65
- shell : bash
66
- run : bash -x ./scripts/run_prometheus.sh
67
- env :
68
- PROMETHEUS_ID : ${{ secrets.PROMETHEUS_ID }}
69
- PROMETHEUS_PASSWORD : ${{ secrets.PROMETHEUS_PASSWORD }}
70
- - name : Start promtail
71
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
72
- shell : bash
73
- run : bash -x ./scripts/run_promtail.sh
74
- env :
75
- LOKI_ID : ${{ secrets.LOKI_ID }}
76
- LOKI_PASSWORD : ${{ secrets.LOKI_PASSWORD }}
77
- - name : Notify of metrics availability
78
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
79
- shell : bash
80
- run : .github/workflows/notify-metrics-availability.sh
81
- env :
82
- GRAFANA_URL : ${{ env.grafana_url }}
83
- GH_JOB_ID : ${{ github.job }}
84
- FILTER_BY_OWNER : avalanchego-e2e
85
59
- name : Run e2e tests
86
- shell : bash
87
- run : E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown
88
- env :
89
- GH_REPO : ${{ github.repository }}
90
- GH_WORKFLOW : ${{ github.workflow }}
91
- GH_RUN_ID : ${{ github.run_id }}
92
- GH_RUN_NUMBER : ${{ github.run_number }}
93
- GH_RUN_ATTEMPT : ${{ github.run_attempt }}
94
- GH_JOB_ID : ${{ github.job }}
60
+ uses : ./.github/actions/run-monitored-tmpnet-cmd
61
+ with :
62
+ run : E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown
63
+ prometheus_id : ${{ secrets.PROMETHEUS_ID || '' }}
64
+ prometheus_password : ${{ secrets.PROMETHEUS_PASSWORD || '' }}
65
+ loki_id : ${{ secrets.LOKI_ID || '' }}
66
+ loki_password : ${{ secrets.LOKI_PASSWORD || '' }}
95
67
- name : Upload tmpnet network dir
96
- uses : actions/upload-artifact@v4
68
+ uses : ./.github/ actions/upload-tmpnet- artifact
97
69
if : always()
98
70
with :
99
71
name : e2e-tmpnet-data
100
- path : |
101
- ~/.tmpnet/networks
102
- ~/.tmpnet/prometheus/prometheus.log
103
- ~/.tmpnet/promtail/promtail.log
104
- if-no-files-found : error
105
72
e2e_existing_network :
106
73
runs-on : ubuntu-latest
107
74
steps :
@@ -110,48 +77,19 @@ jobs:
110
77
- name : Build AvalancheGo Binary
111
78
shell : bash
112
79
run : ./scripts/build.sh -r
113
- - name : Start prometheus
114
- # Only run for the original repo; a forked repo won't have access to the monitoring credentials
115
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
116
- shell : bash
117
- run : bash -x ./scripts/run_prometheus.sh
118
- env :
119
- PROMETHEUS_ID : ${{ secrets.PROMETHEUS_ID }}
120
- PROMETHEUS_PASSWORD : ${{ secrets.PROMETHEUS_PASSWORD }}
121
- - name : Start promtail
122
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
123
- shell : bash
124
- run : bash -x ./scripts/run_promtail.sh
125
- env :
126
- LOKI_ID : ${{ secrets.LOKI_ID }}
127
- LOKI_PASSWORD : ${{ secrets.LOKI_PASSWORD }}
128
- - name : Notify of metrics availability
129
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
130
- shell : bash
131
- run : .github/workflows/notify-metrics-availability.sh
132
- env :
133
- GRAFANA_URL : ${{ env.grafana_url }}
134
- GH_JOB_ID : ${{ github.job }}
135
80
- name : Run e2e tests with existing network
136
- shell : bash
137
- run : E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh --delay-network-shutdown
138
- env :
139
- GH_REPO : ${{ github.repository }}
140
- GH_WORKFLOW : ${{ github.workflow }}
141
- GH_RUN_ID : ${{ github.run_id }}
142
- GH_RUN_NUMBER : ${{ github.run_number }}
143
- GH_RUN_ATTEMPT : ${{ github.run_attempt }}
144
- GH_JOB_ID : ${{ github.job }}
81
+ uses : ./.github/actions/run-monitored-tmpnet-cmd
82
+ with :
83
+ run : E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh --delay-network-shutdown
84
+ prometheus_id : ${{ secrets.PROMETHEUS_ID || '' }}
85
+ prometheus_password : ${{ secrets.PROMETHEUS_PASSWORD || '' }}
86
+ loki_id : ${{ secrets.LOKI_ID || '' }}
87
+ loki_password : ${{ secrets.LOKI_PASSWORD || '' }}
145
88
- name : Upload tmpnet network dir
146
- uses : actions/upload-artifact@v4
89
+ uses : ./.github/ actions/upload-tmpnet- artifact
147
90
if : always()
148
91
with :
149
92
name : e2e-existing-network-tmpnet-data
150
- path : |
151
- ~/.tmpnet/networks
152
- ~/.tmpnet/prometheus/prometheus.log
153
- ~/.tmpnet/promtail/promtail.log
154
- if-no-files-found : error
155
93
Upgrade :
156
94
runs-on : ubuntu-latest
157
95
steps :
@@ -160,48 +98,20 @@ jobs:
160
98
- name : Build AvalancheGo Binary
161
99
shell : bash
162
100
run : ./scripts/build.sh
163
- - name : Start prometheus
164
- # Only run for the original repo; a forked repo won't have access to the monitoring credentials
165
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
166
- shell : bash
167
- run : bash -x ./scripts/run_prometheus.sh
168
- env :
169
- PROMETHEUS_ID : ${{ secrets.PROMETHEUS_ID }}
170
- PROMETHEUS_PASSWORD : ${{ secrets.PROMETHEUS_PASSWORD }}
171
- - name : Start promtail
172
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
173
- shell : bash
174
- run : bash -x ./scripts/run_promtail.sh
175
- env :
176
- LOKI_ID : ${{ secrets.LOKI_ID }}
177
- LOKI_PASSWORD : ${{ secrets.LOKI_PASSWORD }}
178
- - name : Notify of metrics availability
179
- if : (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
180
- shell : bash
181
- run : .github/workflows/notify-metrics-availability.sh
182
- env :
183
- GRAFANA_URL : ${{ env.grafana_url }}
184
- GH_JOB_ID : ${{ github.job }}
185
101
- name : Run e2e tests
186
- shell : bash
187
- run : ./scripts/tests.upgrade.sh
188
- env :
189
- GH_REPO : ${{ github.repository }}
190
- GH_WORKFLOW : ${{ github.workflow }}
191
- GH_RUN_ID : ${{ github.run_id }}
192
- GH_RUN_NUMBER : ${{ github.run_number }}
193
- GH_RUN_ATTEMPT : ${{ github.run_attempt }}
194
- GH_JOB_ID : ${{ github.job }}
102
+ uses : ./.github/actions/run-monitored-tmpnet-cmd
103
+ with :
104
+ run : ./scripts/tests.upgrade.sh
105
+ filter_by_owner : avalanchego-e2e
106
+ prometheus_id : ${{ secrets.PROMETHEUS_ID || '' }}
107
+ prometheus_password : ${{ secrets.PROMETHEUS_PASSWORD || '' }}
108
+ loki_id : ${{ secrets.LOKI_ID || '' }}
109
+ loki_password : ${{ secrets.LOKI_PASSWORD || '' }}
195
110
- name : Upload tmpnet network dir
196
- uses : actions/upload-artifact@v4
111
+ uses : ./.github/ actions/upload-tmpnet- artifact
197
112
if : always()
198
113
with :
199
114
name : upgrade-tmpnet-data
200
- path : |
201
- ~/.tmpnet/networks
202
- ~/.tmpnet/prometheus/prometheus.log
203
- ~/.tmpnet/promtail/promtail.log
204
- if-no-files-found : error
205
115
Lint :
206
116
runs-on : ubuntu-latest
207
117
steps :
0 commit comments