name: Rust CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Build Library
run: cargo build --verbose
- name: Run Unit Tests
run: cargo test --lib --verbose