name: Rust CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Run cargo fmt check
run: cargo fmt --check --all -- --check
- name: Run cargo clippy
run: cargo clippy -- -D warnings
- name: Run cargo test
run: cargo test --workspace --all-features --lib --bins --tests -- --nocapture