22
22
- main
23
23
pull_request :
24
24
paths :
25
+ - " examples/**"
25
26
- " src/**"
27
+ - " tests/**"
26
28
- " Cargo.*"
27
29
- " build.rs"
28
30
- " deny.toml"
@@ -134,13 +136,11 @@ jobs:
134
136
cargo hack check --feature-powerset --no-dev-deps
135
137
136
138
# [impl->req~up-language-ci-test~1]
137
- nextest :
139
+ test :
138
140
# Subset of feature-combos, on only one OS - more complete testing in test-featurematrix.yaml
139
141
outputs :
140
142
test_results_url : ${{ steps.test_results.outputs.artifact-url }}
141
143
runs-on : ubuntu-latest
142
- env :
143
- NEXTEST_EXPERIMENTAL_LIBTEST_JSON : 1
144
144
strategy :
145
145
matrix :
146
146
feature-flags : ["", "--no-default-features", "--all-features"]
@@ -151,28 +151,24 @@ jobs:
151
151
- uses : dtolnay/rust-toolchain@master
152
152
with :
153
153
toolchain : ${{ env.RUST_TOOLCHAIN }}
154
- - uses : Swatinem/rust-cache@v2
155
- # install tool to convert cargo's JSON test output to JUNIT format
156
- - run : |
157
- cargo install cargo2junit
158
- # Using nextest because it's faster than built-in test
159
- - uses : taiki-e/install-action@nextest
160
- - name : Run cargo nextest
154
+
155
+ - name : Run lib tests
156
+ run : |
157
+ mkdir -p ${GITHUB_WORKSPACE}/target
158
+ RUSTC_BOOTSTRAP=1 cargo test --no-fail-fast --lib ${{ matrix.feature-flags }} -- -Z unstable-options --format junit --report-time > ${GITHUB_WORKSPACE}/target/lib-test-results.xml
159
+ - name : Run doc tests
161
160
run : |
162
- cargo nextest run ${{ matrix.feature-flags }} --profile ci
163
- - name : Run doctests
161
+ RUSTC_BOOTSTRAP=1 cargo test --no-fail-fast --doc ${{ matrix.feature-flags }} -- -Z unstable-options --format junit --report-time > ${GITHUB_WORKSPACE}/target/doc-test-results.xml
162
+ - name : Run TCK tests
164
163
run : |
165
- # we use tee to let cargo test print to the console
166
- RUSTC_BOOTSTRAP=1 cargo test --doc ${{ matrix.feature-flags }} -- -Z unstable-options --format json --report-time | tee target/doctest-results.json
167
- # write output to same directory as the one used by cargo nextest in order
168
- # to flatten the directory hierarchy when uploading the test results
169
- cat target/doctest-results.json | cargo2junit > target/nextest/ci/doctest-results.xml
164
+ # the Cucumber based tests write a results file in JUnit format to "tck-[test_name]-results.xml"
165
+ cargo test --no-fail-fast --test 'tck_*' ${{ matrix.feature-flags }} -- --junit-out-folder=${GITHUB_WORKSPACE}/target
170
166
171
167
- name : Upload all-features test results artifact
172
168
id : test_results
173
169
if : matrix.feature-flags == '--all-features'
174
170
uses : actions/upload-artifact@v4
175
171
with :
176
172
name : test-results
177
- # this will include the nextest and doctest result files in the archive's root folder
178
- path : target/nextest/ci/ *-results.xml
173
+ # include all test result files
174
+ path : target/*-results.xml
0 commit comments