4242# Using cargo-hack also allows us to more easily test the feature matrix of our packages.
4343# We use --each-feature & --optional-deps which will run a separate check for every feature.
4444#
45+ # We use cargo-nextest, which has a faster concurrency model for running tests.
46+ # However cargo-nextest does not support running doc tests, so we also have a cargo test --doc step.
47+ # For more information see https://github.com/nextest-rs/nextest/issues/16
48+ #
4549# The MSRV jobs run only cargo check because different clippy versions can disagree on goals and
4650# running tests introduces dev dependencies which may require a higher MSRV than the bare package.
4751#
@@ -242,7 +246,7 @@ jobs:
242246 sudo apt-get update
243247 sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
244248
245- - name : Install cargo-nextest
249+ - name : install cargo-nextest
246250 uses : taiki-e/install-action@v2
247251 with :
248252 tool : cargo-nextest
@@ -252,15 +256,10 @@ jobs:
252256 with :
253257 save-if : ${{ github.event_name != 'merge_group' }}
254258
255- - name : cargo test
256- run : cargo nextest run --workspace --locked --all-features
259+ - name : cargo nextest
260+ run : cargo nextest run --workspace --locked --all-features --no-fail-fast
257261 env :
258262 SKIP_RENDER_TESTS : ${{ matrix.skip_gpu }}
259-
260- # Run doc tests separately because nexttest doesn't run them.
261- # See https://github.com/linebender/xilem/issues/500
262- - name : cargo test doc
263- run : cargo test --doc --workspace --locked --all-features
264263
265264 - name : Upload test results due to failure
266265 uses : actions/upload-artifact@v4
@@ -269,6 +268,9 @@ jobs:
269268 name : masonry-snapshot-tests-${{ matrix.os }}
270269 path : masonry/src/widget/screenshots
271270
271+ - name : cargo test --doc
272+ run : cargo test --doc --workspace --locked --all-features --no-fail-fast
273+
272274 test-stable-wasm :
273275 name : cargo test (wasm32)
274276 runs-on : ubuntu-latest
0 commit comments