Cleanup CI (#141)

* Feature-gate test that depends on non-default features

Makes `cargo check` work without extra flags.

* Don't set doc(html_root_url)

It is no longer recommended:
https://github.com/rust-lang/api-guidelines/pull/230

* Remove documentation URL from Cargo.toml

crates.io will link to the right version on docs.rs automatically.

* Ensure toolchains installed by actions-rs/toolchain are actually used

* Fix missing rustup component in check job

* Raise MSRV to 1.51

Older versions weren't actually working before.

* Only run clippy & rustfmt on stable toolchain

MSRV is checked in test-versions.

* Allow cargo doc to succeed without headers and multipart features

CI will still ensure that intra-doc links that rely on these are not broken.
This commit is contained in:
Jonas Platte
2021-08-07 11:06:42 +02:00
committed by GitHub
parent e13f1da11d
commit 6a042a9b3a
4 changed files with 14 additions and 11 deletions
+9 -5
View File
@@ -10,15 +10,14 @@ jobs:
check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, 1.40.0]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: stable
override: true
profile: minimal
components: clippy
- name: Check
uses: actions-rs/cargo@v1
with:
@@ -37,9 +36,12 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: cargo doc
working-directory: ${{ matrix.subcrate }}
env:
RUSTDOCFLAGS: "-D broken-intra-doc-links"
run: cargo doc --all-features --no-deps
cargo-hack:
@@ -49,6 +51,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Install cargo-hack
run: |
@@ -63,12 +66,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly, 1.40.0]
rust: [stable, beta, nightly, 1.51]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal
- name: Run tests
uses: actions-rs/cargo@v1