Fix upload of docs failing in CI #1047
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: [push, pull_request] | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- run: cargo fmt -- --check | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run tests (only default features) | |
run: cargo test | |
- name: Run tests (all tests enabled) | |
run: cargo test --features "refreshing-token-rustls-webpki-roots" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Check (default features) | |
run: cargo check --examples --lib | |
- name: Check (native-tls) | |
run: cargo check --no-default-features --features "transport-tcp transport-tcp-native-tls transport-ws transport-ws-native-tls refreshing-token-native-tls metrics-collection with-serde" --lib --examples | |
- name: Check (rustls-native-roots) | |
run: cargo check --no-default-features --features "transport-tcp transport-tcp-rustls-native-roots transport-ws transport-ws-rustls-native-roots refreshing-token-rustls-native-roots metrics-collection with-serde" --lib --examples | |
- name: Check (rustls-webpki-roots) | |
run: cargo check --no-default-features --features "transport-tcp transport-tcp-rustls-webpki-roots transport-ws transport-ws-rustls-webpki-roots refreshing-token-rustls-webpki-roots metrics-collection with-serde" --lib --examples | |
- name: Check (no default features) | |
run: cargo check --no-default-features --lib | |
- name: Check (default features with serde) | |
run: cargo check --features "with-serde" --lib | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
# If updating this make sure to update Cargo.toml ([package.metadata.docs.rs]) too | |
- name: Build documentation | |
run: cargo doc --no-deps --no-default-features --features "refreshing-token-rustls-webpki-roots transport-tcp transport-tcp-rustls-webpki-roots transport-ws transport-ws-rustls-webpki-roots metrics-collection with-serde" | |
- uses: actions/upload-artifact@4 | |
with: | |
name: docs | |
path: target/doc/ | |
if-no-files-found: error |