name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run tests
run: cargo test --locked
- name: Run Clippy
run: cargo clippy --all-targets --locked -- -D warnings