name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust-toolchain: ["1.93.0", "stable"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-toolchain }}
components: clippy
default: true
- name: Clippy
run: cargo clippy --verbose -- -D warnings
- name: Clippy without default features
run: cargo clippy --verbose --no-default-features -- -D warnings
- name: Build
run: cargo build --verbose
- name: Build without default features
run: cargo build --verbose --no-default-features
- name: Run tests
run: cargo test --verbose