File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ jobs:
132
132
- name : Rust checks & tests
133
133
run : pixi run rs-check --skip individual_crates docs_slow
134
134
135
+ - name : Upload test results
136
+ uses : actions/upload-artifact@v4
137
+ if : always()
138
+ with :
139
+ name : test-results-ubuntu
140
+ path : " **/tests/snapshots"
141
+
135
142
rerun-lints :
136
143
name : Rerun lints
137
144
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -107,6 +107,13 @@ jobs:
107
107
# See tests/assets/rrd/README.md for more
108
108
run : pixi run check-backwards-compatibility
109
109
110
+ - name : Upload test results
111
+ uses : actions/upload-artifact@v4
112
+ if : always()
113
+ with :
114
+ name : test-results-ubuntu
115
+ path : " **/tests/snapshots"
116
+
110
117
# Run some basics tests on Mac and Windows
111
118
mac-windows-tests :
112
119
name : Test on ${{ matrix.name }}
@@ -160,3 +167,10 @@ jobs:
160
167
- name : Rust all checks & tests
161
168
if : ${{ inputs.CHANNEL == 'nightly' }}
162
169
run : pixi run rs-check
170
+
171
+ - name : Upload test results
172
+ uses : actions/upload-artifact@v4
173
+ if : always()
174
+ with :
175
+ name : test-results-${{ matrix.name }}
176
+ path : " **/tests/snapshots"
Original file line number Diff line number Diff line change @@ -282,11 +282,17 @@ def docs_slow(results: list[Result]) -> None:
282
282
results .append (run_cargo ("doc" , "--document-private-items --no-deps --all-features -p rerun" ))
283
283
284
284
285
+ test_failure_message = 'See the "Upload test results" step for a link to the snapshot test artifact.'
286
+
287
+
285
288
def tests (results : list [Result ]) -> None :
286
289
# We first use `--no-run` to measure the time of compiling vs actually running
287
290
results .append (run_cargo ("test" , "--all-targets --all-features --no-run" ))
288
291
results .append (run_cargo ("nextest" , "run --all-targets --all-features" ))
289
292
293
+ if not results [- 1 ].success :
294
+ print (test_failure_message )
295
+
290
296
# Cargo nextest doesn't support doc tests yet, run those separately.
291
297
results .append (run_cargo ("test" , "--all-features --doc" ))
292
298
@@ -296,6 +302,9 @@ def tests_without_all_features(results: list[Result]) -> None:
296
302
results .append (run_cargo ("test" , "--all-targets --no-run" ))
297
303
results .append (run_cargo ("nextest" , "run --all-targets" ))
298
304
305
+ if not results [- 1 ].success :
306
+ print (test_failure_message )
307
+
299
308
300
309
if __name__ == "__main__" :
301
310
main ()
You can’t perform that action at this time.
0 commit comments