name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Rustfmt Check
run: cargo fmt --all -- --check
- name: Clippy Check
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run Tests
run: cargo test --all-targets --all-features