-
Notifications
You must be signed in to change notification settings - Fork 2
409 lines (401 loc) · 13.2 KB
/
Copy pathint-test.yaml
File metadata and controls
409 lines (401 loc) · 13.2 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
name: NNF Integration-Test
on:
schedule:
# Time is in UTC - start at 10:00pm CST or 11:00pm CDT
- cron: "00 04 * * *"
workflow_dispatch:
# These inputs are only used when running manually
inputs:
system:
description: Which system to run on
type: choice
required: true
default: "htx-1"
options:
- htx-1
procs:
description: Number of parallel workflows to run
required: true
default: 1
type: number
testTarget:
description: Which int-test target to run
type: choice
required: true
default: "simple"
options:
- sanity
- simple
- dm
- container
- full
rounds:
description: How many times to run the test target
type: number
required: true
default: 1
hTimeout:
description: High Timeout duration
type: string
required: true
default: "5m"
lTimeout:
description: Low Timeout duration
type: string
required: true
default: "2m"
runSystemTest:
description: Run system-test
type: boolean
required: true
default: false
runDMSystemTest:
description: Run dm-system-test
type: boolean
required: true
default: false
notifySlack:
description: Report start/results to slack
type: boolean
required: true
default: false
env:
# When running as a cron job, these values will be used since there will be no inputs. These
# fields match the inputs above.
TEST_TARGET: full
PROCS: 1
HTIMEOUT: 5m
LTIMEOUT: 2m
SYSTEM: htx-1
ROUNDS: 1
NOTIFY_SLACK: "true"
# These env vars are used for either type of run
SLACK_CHANNEL_ID: C043U7PRGGM # rabbit-notifications
# SLACK_CHANNEL_ID: C06SMGMM3PY # rabbit-notifications-sandbox
RUN_URL: "<https://github.com/NearNodeFlash/nnf-integration-test/actions/runs/${{ github.run_id }}|#${{ github.run_number }}>"
jobs:
# int-test:
# runs-on: ${{ inputs.system || 'htx-1' }}
# outputs:
# test-result: ${{ steps.int-test.outcome }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Version
# run: ./git-version-gen
# # If this is a manual run (workflow_dispatch trigger), then override the env vars with the input values.
# - name: Override TEST_TARGET with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "TEST_TARGET=${{ inputs.testTarget }}" >> $GITHUB_ENV
# - name: Override PROCS with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "PROCS=${{ inputs.procs }}" >> $GITHUB_ENV
# - name: Override ROUNDS with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "ROUNDS=${{ inputs.rounds }}" >> $GITHUB_ENV
# - name: Override LTIMEOUT with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "LTIMEOUT=${{ inputs.lTimeout }}" >> $GITHUB_ENV
# - name: Override HTIMEOUT with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "HTIMEOUT=${{ inputs.hTimeout }}" >> $GITHUB_ENV
# - name: Override NOTIFY_SLACK with manual input
# if: github.event_name == 'workflow_dispatch'
# run: |
# echo "NOTIFY_SLACK=${{ inputs.notifySlack }}" >> $GITHUB_ENV
# # Optionally send a slack message
# - name: Start Slack Message
# if: ${{ env.NOTIFY_SLACK == 'true' }}
# uses: archive/github-actions-slack@master
# id: start-message
# with:
# slack-function: send-message
# slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
# slack-channel: ${{ env.SLACK_CHANNEL_ID }}
# slack-optional-blocks: >-
# [
# {
# "type": "header",
# "text": {
# "type": "plain_text",
# "text": "NNF Integration Test",
# "emoji": true
# }
# },
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "Run ${{ env.RUN_URL }}\n_triggered via ${{ github.event_name }}_"
# }
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*System*\n${{ env.SYSTEM }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Test Type*\n${{ env.TEST_TARGET }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Num Procs*\n${{ env.PROCS }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Rounds*\n${{ env.ROUNDS }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Status*\n:hourglass: In Progress"
# }
# ]
# },
# {
# "type": "divider"
# }
# ]
# # Setup and Run the Test
# - name: Setup Go
# uses: actions/setup-go@v3
# with:
# go-version-file: "go.mod"
# cache: true
# - name: Install Ginkgo and Ginkgo CLI
# run: make init
# - name: Run int-test (P=${{ env.P }} ${{ env.TEST_TARGET }}) ${{ env.ROUNDS }} time(s) on ${{ env.SYSTEM }}
# id: int-test
# shell: bash
# env:
# P: ${{ env.PROCS }}
# HTIMEOUT: ${{ env.HTIMEOUT }}
# LTIMEOUT: ${{ env.LTIMEOUT }}
# run: |
# for i in {1..${{ env.ROUNDS }}}; do
# echo ""
# echo "--------------------"
# echo "Attempt start: $i"
# echo "--------------------"
# echo ""
# make ${{ env.TEST_TARGET }}
# echo ""
# echo "@@@@@@@@@@@@@@@@@@@@"
# echo "Attempt end: $i"
# echo "@@@@@@@@@@@@@@@@@@@@"
# echo ""
# done
# # Optionally update the slack message with a failure
# - name: Failure Slack Message
# if: ${{ env.NOTIFY_SLACK == 'true' && failure() }}
# uses: archive/github-actions-slack@master
# with:
# slack-function: update-message
# slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
# slack-channel: ${{ env.SLACK_CHANNEL_ID }}
# slack-update-message-ts: ${{ fromJson(steps.start-message.outputs.slack-result).response.message.ts }}
# slack-optional-blocks: >-
# [
# {
# "type": "header",
# "text": {
# "type": "plain_text",
# "text": "NNF Integration Test",
# "emoji": true
# }
# },
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "Run ${{ env.RUN_URL }}\n_triggered via ${{ github.event_name }}_"
# }
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*System*\n${{ env.SYSTEM }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Test Type*\n${{ env.TEST_TARGET }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Num Procs*\n${{ env.PROCS }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Rounds*\n${{ env.ROUNDS }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Status*\n:red_circle: Test Failed"
# }
# ]
# },
# {
# "type": "divider"
# }
# ]
# # Optionally update the slack message with success
# - name: Success Slack Message
# if: ${{ env.NOTIFY_SLACK == 'true' && success() }}
# uses: archive/github-actions-slack@master
# with:
# slack-function: update-message
# slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
# slack-channel: ${{ env.SLACK_CHANNEL_ID }}
# slack-update-message-ts: ${{ fromJson(steps.start-message.outputs.slack-result).response.message.ts }}
# slack-optional-blocks: >-
# [
# {
# "type": "header",
# "text": {
# "type": "plain_text",
# "text": "NNF Integration Test",
# "emoji": true
# }
# },
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "Run ${{ env.RUN_URL }}\n_triggered via ${{ github.event_name }}_"
# }
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*System*\n${{ env.SYSTEM }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Test Type*\n${{ env.TEST_TARGET }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Num Procs*\n${{ env.PROCS }}"
# },
# {
# "type": "mrkdwn",
# "text": "*Rounds*\n${{ env.ROUNDS }}"
# }
# ]
# },
# {
# "type": "section",
# "fields": [
# {
# "type": "mrkdwn",
# "text": "*Status*\n:green_circle: Test Passed"
# }
# ]
# },
# {
# "type": "divider"
# }
# ]
# Only run system test after int-test is successful. If int-test fails, it can leave around
# artifacts.
system-test:
# needs: int-test
# if: ${{ github.event_name == 'schedule' || inputs.runSystemTest == true }}
runs-on: ${{ inputs.system || 'htx-1' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Version
run: ./git-version-gen
- name: View Permissions
run: id
- name: Install Bats
run: |
cd system-test
make init
- name: Create env file
run: |
cd system-test
touch env
echo "GLOBAL_LUSTRE_ROOT?=/lus/global" >> env
echo "TEST_TMPDIR_PREFIX?=/nfs/imports/run/${USER}" >> env
echo "DM_PROFILE?=no-xattr" >> env
echo "N ?=4" >> env
echo "J ?=1" >> env
- name: Run system-test
run: |
cd system-test
make test
# Ensure dm-system-test runs after system-test. system-test is optional, so we need to use
# always() to ensure this runs even when system-test does not.
dm-system-test:
needs: system-test
if: ${{ always() && ( github.event_name == 'schedule' || inputs.runDMSystemTest == true ) }}
runs-on: ${{ inputs.system || 'htx-1' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Version
run: ./git-version-gen
- name: View Permissions
run: id
- name: Install Bats
run: |
cd system-test
make init
- name: Create env file
run: |
cd system-test
touch env
echo "GLOBAL_LUSTRE_ROOT?=/lus/global" >> env
echo "TEST_TMPDIR_PREFIX?=/nfs/imports/run/${USER}" >> env
echo "DM_PROFILE?=no-xattr" >> env
echo "ENABLE_COPY_OFFLOAD?=yes" >> env
echo "N ?=2" >> env
echo "J ?=2" >> env
- name: Run dm-system-test
run: |
cd system-test
make dm