name: Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build
run: cargo build --verbose
env:
RUSTFLAGS: -Dwarnings
- name: Run tests
run: cargo test --verbose
env:
RUSTFLAGS: -Dwarnings
- name: Check formatting
run: cargo fmt -- --check
- name: Install cargo-hack and cargo-minimal-versions
run: |
cargo install cargo-hack
cargo install cargo-minimal-versions
- name: Test with minimal versions
run: cargo minimal-versions test