name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install rustfmt & clippy
run: |
rustup component add rustfmt || true
rustup component add clippy || true
- name: Format check
run: cargo fmt --all -- --check
- name: Lint (clippy)
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --workspace --all-features
- name: Crate dry-run
run: cargo publish --dry-run