name: CI
on:
push:
branches:
- main
- "features/**"
- "feature/**"
pull_request:
branches:
- main
jobs:
check-and-test:
name: Check, Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check Formatting
run: cargo fmt --check
- name: Clippy (all targets)
run: cargo clippy --all-targets -- -D warnings
- name: Run Tests
run: cargo test --all-targets
- name: Install cargo-audit
uses: taiki-e/install-action@cargo-audit
- name: Security Audit (cargo-audit)
run: cargo audit