name: CI
on:
push:
branches: [master]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Format, Clippy, Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-ci-
${{ runner.os }}-cargo-
- run: make fmt
- run: make lint
- run: make test