From 4558f8ae21d6137fdd97087acde08eeb3a9c42ac Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 1 Sep 2021 21:12:12 +0100 Subject: [PATCH] run doc test in parallel --- .cargo/config.toml | 2 ++ .github/workflows/ci.yml | 23 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 75362685..a0b640b6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,5 @@ [alias] chk = "check --workspace --all-features --tests --examples --bins" lint = "clippy --workspace --all-features --tests --examples --bins -- -Dclippy::todo" +ci-test = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture" +ci-doctest = "hack test --workspace --all-features --doc --no-fail-fast -- --nocapture" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcb90185..9a5e4fa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,9 +104,7 @@ jobs: - name: tests if: matrix.target.triple != 'x86_64-pc-windows-gnu' uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features --no-fail-fast -- --nocapture + with: { command: ci-test } - name: Generate coverage file if: > @@ -129,3 +127,22 @@ jobs: run: | cargo install cargo-cache --version 0.6.2 --no-default-features --features ci-autoclean cargo-cache + + rustdoc: + name: rustdoc + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Rust (nightly) + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-x86_64-unknown-linux-gnu + profile: minimal + override: true + + - name: doc tests + uses: actions-rs/cargo@v1 + timeout-minutes: 40 + with: { command: ci-doctest }