Modify doc tests to set docsrs

Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
Joe Richey 2021-01-19 02:46:38 -08:00
parent 69634b700e
commit 2cfbd8ee60
No known key found for this signature in database
GPG Key ID: 1DD6D05AA306C53F

View File

@ -21,7 +21,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly # Needed for -Z minimal-versions
toolchain: nightly # Needed for -Z minimal-versions and doc_cfg
override: true
- uses: Swatinem/rust-cache@v1
- name: Install precompiled cargo-deadlinks
@ -30,7 +30,10 @@ jobs:
wget -O /tmp/cargo-deadlinks $URL
chmod +x /tmp/cargo-deadlinks
mv /tmp/cargo-deadlinks ~/.cargo/bin
- run: cargo deadlinks -- --features=custom,std
- name: Generate Docs
env:
RUSTDOCFLAGS: --cfg docsrs
run: cargo deadlinks -- --features=custom,std
- run: |
cargo generate-lockfile -Z minimal-versions
cargo test --features=custom,std