Skip to content

Release 0.4.1

Release 0.4.1 #12

Workflow file for this run

name: CI
on:
push:
branches: "**"
pull_request:
branches: "**"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
RUST_MSRV: "1.70.0" # Default fallback MSRV
jobs:
test:
name: Basic checks
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install cargo-deadlinks
run: cargo install cargo-deadlinks
- name: Build
run: cargo build --verbose
- name: Clippy (default features)
run: cargo clippy --all-targets
- name: Clippy (all features)
run: cargo clippy --all-features
- name: Examples
run: |
cargo clippy --example full --features=full
cargo clippy --example minimal --features="errors health tera"
cargo clippy --example api --features="errors health stats utoipa"
- name: Documentation
run: cargo doc --all-features
- name: Check deadlinks
run: cargo deadlinks
- name: Run tests (default features)
run: cargo test
feature-checks:
name: Feature combination checks
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Check each feature
run: cargo hack check --each-feature --no-dev-deps
# The following actions specifically set the targets, excluding examples,
# because the examples have their own required feature sets
- name: Check feature powerset
run: cargo hack check --feature-powerset --no-dev-deps
- name: Clippy each feature
run: cargo hack clippy --each-feature --lib --bins --tests --benches
- name: Clippy feature powerset
run: cargo hack clippy --feature-powerset --lib --bins --tests --benches
- name: Test each feature
run: cargo hack test --each-feature --lib --bins --tests --benches
- name: Test feature powerset
run: cargo hack test --feature-powerset --lib --bins --tests --benches
msrv:
name: Check MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get MSRV from Cargo.toml
run: |
MSRV=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].rust_version // "${{ env.RUST_MSRV }}"')
echo "MSRV=$MSRV" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- name: Debug info
run: |
echo "MSRV: $MSRV"
echo "Rust: $(rustc --version)"
- name: Check MSRV
run: cargo check