name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
fmt:
name: Rustfmt Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: Clippy Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- "--all-features"
- "--no-default-features"
- "--no-default-features --features cli"
steps:
- uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run clippy
run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- ""
- "--no-default-features"
- "--no-default-features --features cli"
steps:
- uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test --all-targets ${{ matrix.features }}