name: CI
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install rustfmt and clippy
run: rustup component add rustfmt clippy
- name: Check formatting
run: cargo fmt -- --check
- name: Run tests
run: cargo test
- name: Run Clippy
run: cargo clippy