name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: rustfmt
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: no-default feature build
run: cargo test --no-default-features --lib
- name: doc
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
- name: no-default docs
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --no-default-features
- name: examples
run: cargo build --examples --all-features
- name: test
run: cargo test --all-features
- name: Semver check
if: github.event_name == 'pull_request'
run: |
cargo install cargo-semver-checks --locked || true
cargo semver-checks
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@1.80.0
- name: check library with all features
run: cargo check --lib --all-features
- name: check raw library without default features
run: cargo check --lib --no-default-features