on: [push, pull_request]
name: CI
env:
CARGO_TERM_COLOR: always
jobs:
basic:
name: Basic
runs-on: ubuntu-latest
strategy:
matrix:
features:
- ''
- '--features=blocking'
- '--no-default-features'
- '--no-default-features --features=rustls-tls'
rust:
- stable
- beta
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.rust }} toolchain
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt,clippy
rustup default ${{ matrix.rust }}
- name: Cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.features }}
- name: Build all targets
run: cargo build --all-targets ${{ matrix.features }}
- name: Run the test suite
run: cargo test ${{ matrix.features }}
- name: Check formatting
run: cargo fmt --check
- name: Check clippy lints
run: cargo clippy ${{ matrix.features }} -- -D warnings