From 2f5359166ac946afa86eaececb568dfb945ec19f Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Mon, 11 Nov 2024 15:03:01 +0200 Subject: [PATCH] Add CI support for doc tests. --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4498c399b..8b925dcb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,10 @@ env: # Using cargo-hack also allows us to more easily test the feature matrix of our packages. # We use --each-feature & --optional-deps which will run a separate check for every feature. # +# We use cargo-nextest, which has a faster concurrency model for running tests. +# However cargo-nextest does not support running doc tests, so we also have a cargo test --doc step. +# For more information see https://github.com/nextest-rs/nextest/issues/16 +# # The MSRV jobs run only cargo check because different clippy versions can disagree on goals and # running tests introduces dev dependencies which may require a higher MSRV than the bare package. # @@ -217,7 +221,7 @@ jobs: sudo apt-get update sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - - name: Install cargo-nextest + - name: install cargo-nextest uses: taiki-e/install-action@v2 with: tool: cargo-nextest @@ -227,7 +231,7 @@ jobs: with: save-if: ${{ github.event_name != 'merge_group' }} - - name: cargo test + - name: cargo nextest # TODO: Maybe use --release; the CPU shaders are extremely slow when unoptimised run: cargo nextest run --workspace --locked --all-features --no-fail-fast env: @@ -247,6 +251,9 @@ jobs: vello_tests/smoke_snapshots vello_tests/comparisons + - name: cargo test --doc + run: cargo test --doc --workspace --locked --all-features --no-fail-fast + test-stable-wasm: name: cargo test (wasm32) runs-on: ubuntu-latest