19
19
default : true
20
20
run_fullmfwfota_test :
21
21
type : boolean
22
- required : true
22
+ required : false
23
23
default : false
24
24
run_dfu_tests :
25
25
type : boolean
29
29
type : boolean
30
30
required : false
31
31
default : true
32
+ run_wifi_location_tests :
33
+ type : boolean
34
+ required : false
35
+ default : true
36
+ run_modem_trace_tests :
37
+ type : boolean
38
+ required : false
39
+ default : true
40
+ run_ppk_tests :
41
+ type : boolean
42
+ required : false
43
+ default : false
32
44
workflow_dispatch :
33
45
inputs :
34
46
artifact_fw_version :
59
71
type : boolean
60
72
required : true
61
73
default : false
74
+ run_wifi_location_tests :
75
+ type : boolean
76
+ required : true
77
+ default : false
78
+ run_modem_trace_tests :
79
+ type : boolean
80
+ required : true
81
+ default : false
82
+ run_ppk_tests :
83
+ type : boolean
84
+ required : true
85
+ default : false
62
86
63
87
jobs :
64
88
target_test :
65
89
name : Target Test
66
90
runs-on : self-hosted
91
+ permissions :
92
+ contents : write
67
93
environment : production
68
94
container :
69
95
image : ghcr.io/hello-nrfcloud/firmware:docker-v1.0.3
@@ -183,6 +209,7 @@ jobs:
183
209
LOG_FILENAME : oob_conn_bridge_test_log
184
210
185
211
- name : Run Wi-Fi location tests
212
+ if : ${{ inputs.run_wifi_location_tests }}
186
213
working-directory : thingy91x-oob/tests/on_target
187
214
run : |
188
215
mkdir -p results
@@ -193,6 +220,7 @@ jobs:
193
220
SEGGER : ${{ secrets.SEGGER_DUT_1 }}
194
221
195
222
- name : Run modem trace test
223
+ if : ${{ inputs.run_modem_trace_tests }}
196
224
working-directory : thingy91x-oob/tests/on_target
197
225
run : |
198
226
mkdir -p results
@@ -202,6 +230,76 @@ jobs:
202
230
env :
203
231
SEGGER : ${{ secrets.SEGGER_DUT_1 }}
204
232
233
+ - name : Run PPK tests
234
+ if : ${{ inputs.run_ppk_tests }}
235
+ id : ppk_test
236
+ working-directory : thingy91x-oob/tests/on_target
237
+ run : |
238
+ mkdir -p results
239
+ pytest -s -v -m dut_ppk \
240
+ --junit-xml=results/test-results-ppk.xml \
241
+ tests
242
+ env :
243
+ SEGGER : ${{ secrets.SEGGER_DUT_PPK }}
244
+
245
+ - name : Commit and Push Badge File to gh-pages Branch
246
+ if : always()
247
+ working-directory : thingy91x-oob
248
+ env :
249
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
250
+ run : |
251
+ # Define file paths as variables
252
+ BADGE_FILE=tests/on_target/power_badge.json
253
+ HTML_FILE=tests/on_target/power_measurements_plot.html
254
+ CSV_FILE=tests/on_target/power_measurements.csv
255
+
256
+ # Check if the badge file exists at the specified location
257
+ if [ -f $BADGE_FILE ]; then
258
+ echo "Badge file found, proceeding to commit."
259
+ else
260
+ echo "Badge file not found. Exiting..."
261
+ exit 1
262
+ fi
263
+
264
+ # Check if the html file exists at the specified location
265
+ if [ -f $HTML_FILE ]; then
266
+ echo "Html file found, proceeding to commit."
267
+ else
268
+ echo "Html file not found. Exiting..."
269
+ exit 1
270
+ fi
271
+
272
+ # Check if the csv file exists at the specified location
273
+ if [ -f $CSV_FILE ]; then
274
+ echo "Csv file found, proceeding to commit."
275
+ else
276
+ echo "Csv file not found. Exiting..."
277
+ exit 1
278
+ fi
279
+
280
+ # Configure Git to trust the current working directory
281
+ git config --global --add safe.directory /__w/firmware/firmware
282
+
283
+ # Set Git user name and email for commits in the GitHub Actions environment
284
+ git config --global user.email "[email protected] "
285
+ git config --global user.name "GitHub Actions"
286
+
287
+ # Ensure the gh-pages branch exists and switch to it
288
+ git fetch origin gh-pages || git checkout -b gh-pages
289
+ git checkout gh-pages
290
+
291
+ # Stage, commit, and push changes to the branch
292
+ echo ls tests/on_target/
293
+ ls tests/on_target/
294
+ echo ls docs/
295
+ ls docs/
296
+ cp $BADGE_FILE docs/power_badge.json
297
+ cp $HTML_FILE docs/power_measurements_plot.html
298
+ cp $CSV_FILE docs/power_measurements.csv
299
+ git add docs/power_badge.json docs/power_measurements_plot.html docs/power_measurements.csv
300
+ git commit -m "Update power badge, html and csv to docs folder"
301
+ git push origin gh-pages
302
+
205
303
- name : Results
206
304
if : always()
207
305
0 commit comments