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
This commit is contained in:
David Pedersen 2021-08-19 09:34:48 +02:00 committed by GitHub
parent 2d6b5dd0b8
commit 0f48f33e9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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