fix: disable reqwest default-features (#8) #42
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: | |
branches: [latest] | |
pull_request: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test_library: | |
name: Test library | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup rust stable | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Setup rust nightly | |
if: matrix.os == 'ubuntu-latest' | |
run: rustup toolchain install nightly --profile minimal --no-self-update | |
- name: Initialize cache | |
if: matrix.os != 'windows-latest' | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: ${{ github.ref_name }} | |
shared-key: ${{ matrix.os }} | |
cache-all-crates: true | |
- name: Check formatting | |
if: matrix.os == 'ubuntu-latest' | |
run: cargo fmt -- --check | |
- name: Check clippy | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cargo clippy --lib --tests --all-targets -- -D warnings | |
cargo clippy --lib --tests --all-targets --features cache-reqwest -- -D warnings | |
cargo clippy --lib --tests --all-targets --no-default-features --features client-surf -- -D warnings | |
cargo clippy --lib --tests --all-targets --no-default-features --features client-surf,cache-surf -- -D warnings | |
- name: Run cargo test | |
run: | | |
cargo test --all-targets | |
cargo test --all-targets --features cache-reqwest | |
cargo test --all-targets --no-default-features --features client-surf | |
cargo test --all-targets --no-default-features --features client-surf,cache-surf | |
- name: Build docs | |
if: matrix.os == 'ubuntu-latest' | |
run: cargo +nightly doc --no-deps --document-private-items | |
env: | |
RUSTFLAGS: --cfg docsrs | |
RUSTDOCFLAGS: --cfg docsrs -Dwarnings |