File tree 2 files changed +18
-12
lines changed
2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change
1
+ # # cargo nextest configuration file
2
+
3
+ [profile .ci ]
4
+ # Print out output for failing tests as soon as they fail, and also at the end
5
+ # of the run (for easy scrollability).
6
+ failure-output = " immediate-final"
7
+ # Do not cancel the test run on the first failure.
8
+ fail-fast = false
9
+
10
+ [profile .ci .junit ]
11
+ path = " tests-result.junit.xml"
12
+ report-name = " mithril-tests"
Original file line number Diff line number Diff line change @@ -125,26 +125,22 @@ jobs:
125
125
cargo-tools : cargo-nextest cargo2junit
126
126
127
127
- name : Build tests
128
- shell : bash
129
128
run : cargo nextest run --no-run
130
129
131
130
- name : Run tests
131
+ run : cargo nextest run --profile ci ${{ matrix.test-args }}
132
+
133
+ - name : Rename junit file to include runner info
132
134
shell : bash
133
- run : |
134
- set -o pipefail && \
135
- cargo nextest run --no-fail-fast ${{ matrix.test-args }}
136
- # TODO: Previous command that uses unstable options which are not supported anymore in stable toolchain
137
- #cargo test --no-fail-fast ${{ matrix.test-args }} \
138
- # -- -Z unstable-options --format json --report-time \
139
- # | tee >(cargo2junit > test-results${{ matrix.artifact-suffix }}-${{ runner.os }}-${{ runner.arch }}.xml)
135
+ run : mv target/nextest/ci/tests-result.junit.xml test-results${{ matrix.artifact-suffix }}-${{ runner.os }}-${{ runner.arch }}.xml
140
136
141
137
- name : Upload Tests Results
142
138
uses : actions/upload-artifact@v3
143
139
if : success() || failure()
144
140
with :
145
141
name : test-results${{ matrix.artifact-suffix }}-${{ runner.os }}-${{ runner.arch }}
146
142
path : |
147
- ./**/ test-results-*.xml
143
+ ./test-results-*.xml
148
144
149
145
check :
150
146
runs-on : ubuntu-22.04
@@ -236,9 +232,7 @@ jobs:
236
232
if-no-files-found : error
237
233
238
234
publish-tests-results :
239
- # TODO: reactivate when cargo test errors export to json works in stable version
240
- # if: success() || failure()
241
- if : false
235
+ if : success() || failure()
242
236
runs-on : ubuntu-22.04
243
237
needs :
244
238
- test
You can’t perform that action at this time.
0 commit comments