name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, "1.75"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
if: matrix.toolchain == 'stable'
- run: cargo clippy --all-targets -- -D warnings
if: matrix.toolchain == 'stable'
- run: cargo build --all-features
- run: cargo test --all-features