Remove MSRV checks from CI #11
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: CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-test: | |
name: Build & Test ${{ matrix.runtime }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- version: stable # STABLE | |
runtime: | |
- blocking | |
- tokio | |
- async-std | |
features: | |
- default | |
- async | |
- async-https | |
- async-https-native | |
- async-https-rustls | |
- async-https-rustls-manual-roots | |
- blocking | |
- blocking-https | |
- blocking-https-rustls | |
- blocking-https-native | |
- blocking-https-bundled | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Generate cache key | |
run: echo "${{ matrix.rust.version }} ${{ matrix.runtime }} ${{ matrix.features }}" | tee .cache_key | |
- name: Rust Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: Install Rust Toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust.version }} | |
- name: Set profile | |
run: rustup set profile minimal | |
- name: Update toolchain | |
run: rustup update | |
- name: Build | |
run: cargo build --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features | |
- name: Test | |
run: cargo test --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features -- --test-threads=1 | |
fmt: | |
name: Rust Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Check fmt | |
run: cargo fmt --all --check | |
clippy: | |
name: Rust Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Rust Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: Check clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --all-targets -- -D warnings |