From 0f48f33e9d0018f6439198d8cdf0d811e7773fa6 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Thu, 19 Aug 2021 09:34:48 +0200 Subject: [PATCH] Make sure doc tests run on CI (#206) * Make sure doc tests run on CI * Run doc tests in separate step Don't need to run them for stable, beta, nightly --- .github/workflows/CI.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 95c4714c..b655e144 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -148,6 +148,39 @@ jobs: command: test args: --all --all-features --all-targets + test-docs: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + # caching + - name: Cache cargo registry + uses: actions/cache@v2.1.6 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-v1-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v2.1.6 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-v1-cargo-index-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo target dir + uses: actions/cache@v2.1.6 + with: + path: target + key: ${{ runner.os }}-v1-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + # /caching + - name: Run doc tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --doc + deny-check: name: cargo-deny check runs-on: ubuntu-latest