@@ -3,44 +3,23 @@ name: Target tests
3
3
on :
4
4
workflow_call :
5
5
inputs :
6
+ artifact_run_id :
7
+ description : The run ID of the workflow to fetch artifacts from
8
+ type : string
9
+ required : true
6
10
artifact_fw_version :
11
+ description : The firmware version found under this run_id
7
12
type : string
8
13
required : true
9
- artifact_run_id :
14
+ pytest_marker :
10
15
type : string
11
16
required : true
12
- run_log_check_tests :
13
- type : boolean
14
- required : false
15
- default : true
16
- run_fota_tests :
17
- type : boolean
18
- required : false
19
- default : true
20
- run_fullmfwfota_test :
21
- type : boolean
22
- required : false
23
- default : false
24
- run_dfu_tests :
25
- type : boolean
26
- required : false
27
- default : true
28
- run_connectivity_bridge_tests :
29
- type : boolean
30
- required : false
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
17
+ default : -m "not slow"
18
+ pytest_path :
19
+ type : string
42
20
required : false
43
- default : false
21
+ default : tests
22
+
44
23
workflow_dispatch :
45
24
inputs :
46
25
artifact_fw_version :
51
30
description : The run ID of the workflow to fetch artifacts from
52
31
type : string
53
32
required : true
54
- run_log_check_tests :
55
- type : boolean
56
- required : true
57
- default : true
58
- run_fota_tests :
59
- type : boolean
60
- required : true
61
- default : false
62
- run_fullmfwfota_test :
63
- type : boolean
64
- required : true
65
- default : false
66
- run_dfu_tests :
67
- type : boolean
68
- required : true
69
- default : false
70
- run_connectivity_bridge_tests :
71
- type : boolean
72
- required : true
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
33
+ pytest_marker :
34
+ description : The pytest marker to run
35
+ type : string
84
36
required : true
85
- default : false
37
+ default : -m "not slow"
38
+ pytest_path :
39
+ description : Select test execution path
40
+ type : string
41
+ required : false
42
+ default : tests
86
43
87
44
jobs :
88
45
target_test :
@@ -135,107 +92,27 @@ jobs:
135
92
--software-version ${{ inputs.artifact_fw_version }} \
136
93
hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91.elf
137
94
138
- - name : Run UART tests
139
- if : ${{ inputs.run_log_check_tests }}
95
+ - name : Tests
140
96
working-directory : thingy91x-oob/tests/on_target
141
97
run : |
142
98
mkdir -p results
143
- pytest -s -v -m "dut1 and uart" \
144
- --junit-xml=results/test-results-uart.xml \
145
- tests
146
- env :
147
- SEGGER : ${{ secrets.SEGGER_DUT_1 }}
148
- LOG_FILENAME : oob_uart_test_log
149
-
150
- - name : Run FOTA tests (standard)
151
- if : ${{ inputs.run_fota_tests }}
152
- working-directory : thingy91x-oob/tests/on_target
153
- run : |
154
- pytest -s -v -m "dut1 and fota" \
155
- --junit-xml=results/test-results-fota.xml \
156
- tests
157
- env :
158
- SEGGER : ${{ secrets.SEGGER_DUT_1 }}
159
- IMEI : ${{ secrets.IMEI_DUT_1 }}
160
- FINGERPRINT : ${{ secrets.FINGERPRINT_DUT_1 }}
161
- LOG_FILENAME : oob_fota_test_log
162
-
163
- - name : Run FOTA tests (FULLMFW)
164
- if : ${{ inputs.run_fullmfwfota_test }}
165
- working-directory : thingy91x-oob/tests/on_target
166
- run : |
167
- pytest -s -v -m "dut1 and fullmfw_fota" \
168
- --junit-xml=results/test-results-fullmfw-fota.xml \
169
- tests
99
+ pytest -s -v ${{ inputs.pytest_marker }} \
100
+ --junit-xml=results/test-results-dut1.xml \
101
+ --html=results/test-results-dut1.html --self-contained-html \
102
+ ${{ inputs.pytest_path }}
170
103
env :
171
104
SEGGER : ${{ secrets.SEGGER_DUT_1 }}
172
- IMEI : ${{ secrets.IMEI_DUT_1 }}
173
- FINGERPRINT : ${{ secrets.FINGERPRINT_DUT_1 }}
174
- LOG_FILENAME : oob_fullmfw_fota_test_log
175
-
176
- - name : Run DFU tests
177
- if : ${{ inputs.run_dfu_tests }}
178
- working-directory : thingy91x-oob/tests/on_target
179
- run : |
180
- pytest -s -v -m "dut2 and dfu" \
181
- --junit-xml=results/test-results-dfu.xml \
182
- tests
183
- env :
184
105
SEGGER_NRF53 : ${{ secrets.SEGGER_DUT_2_EXT_DBG }}
185
106
SEGGER_NRF91 : ${{ secrets.SEGGER_DUT_2_NRF91 }}
186
- UART_ID : ${{ secrets.UART_DUT_2 }}
187
-
188
- LOG_FILENAME : oob_dfu_test_log
189
-
190
- - name : Run Connectivity Bridge Test
191
- if : ${{ inputs.run_connectivity_bridge_tests }}
192
- working-directory : thingy91x-oob/tests/on_target
193
- run : |
194
- pytest -s -v -m "dut2 and conn_bridge" \
195
- --junit-xml=results/test-results-connectivity-bridge.xml \
196
- tests
197
- env :
198
- SEGGER_NRF53 : ${{ secrets.SEGGER_DUT_2_EXT_DBG }}
199
- UART_ID : ${{ secrets.UART_DUT_2 }}
200
- LOG_FILENAME : oob_conn_bridge_test_log
201
-
202
- - name : Run Wi-Fi location tests
203
- if : ${{ inputs.run_wifi_location_tests }}
204
- working-directory : thingy91x-oob/tests/on_target
205
- run : |
206
- mkdir -p results
207
- pytest -s -v -m "dut1 and wifi" \
208
- --junit-xml=results/test-results-wifi-location.xml \
209
- tests
210
- env :
211
- SEGGER : ${{ secrets.SEGGER_DUT_1 }}
212
-
213
- - name : Run modem trace test
214
- if : ${{ inputs.run_modem_trace_tests }}
215
- working-directory : thingy91x-oob/tests/on_target
216
- run : |
217
- mkdir -p results
218
- pytest -s -v -m "dut1 and traces" \
219
- --junit-xml=results/test-results-traces-location.xml \
220
- tests
221
- env :
222
- SEGGER : ${{ secrets.SEGGER_DUT_1 }}
223
-
224
- - name : Run PPK tests
225
- if : ${{ inputs.run_ppk_tests }}
226
- continue-on-error : true
227
- id : ppk_test
228
- working-directory : thingy91x-oob/tests/on_target
229
- run : |
230
- mkdir -p results
231
- pytest -s -v -m dut_ppk \
232
- --junit-xml=results/test-results-ppk.xml \
233
- tests
234
- env :
235
- SEGGER : ${{ secrets.SEGGER_DUT_PPK }}
107
+ IMEI : ${{ secrets.IMEI_DUT_1 }}
108
+ UART_ID_DUT_2 : ${{ secrets.UART_DUT_2 }}
109
+ FINGERPRINT : ${{ secrets.FINGERPRINT_DUT_1 }}
110
+ LOG_FILENAME : oob_uart_test_log
111
+ TEST_REPORT_NAME : OOB Firwmare Test Report
112
+ DUT1_HW_REVISION : ${{ vars.DUT1_HW_REVISION }}
113
+ SEGGER_PPK : ${{ secrets.SEGGER_DUT_PPK }}
236
114
237
115
- name : Commit and Push Badge File to gh-pages Branch
238
- if : ${{ inputs.run_ppk_tests }}
239
116
continue-on-error : true
240
117
working-directory : thingy91x-oob
241
118
env :
@@ -251,6 +128,15 @@ jobs:
251
128
fail-on-empty : true
252
129
title : OOB FW Test Results
253
130
131
+ - name : Create Report Artifact
132
+ if : always()
133
+ uses : actions/upload-artifact@v4
134
+ id : artifact-report
135
+ with :
136
+ name : test-report
137
+ path : |
138
+ thingy91x-oob/tests/on_target/results/*.html
139
+
254
140
- name : Push log files to artifacts
255
141
if : always()
256
142
uses : actions/upload-artifact@v4
0 commit comments