Runs cargo fmt/clippy/test/audit via the existing cargo-make ci task on every push and pull request. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
35 lines
791 B
YAML
35 lines
791 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: docker
|
|
container: rust:latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/bin
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Install toolchain components
|
|
run: rustup component add clippy rustfmt
|
|
|
|
- name: Install cargo-make and cargo-audit
|
|
run: |
|
|
for crate in cargo-make cargo-audit; do
|
|
command -v "$crate" >/dev/null 2>&1 || cargo install "$crate"
|
|
done
|
|
|
|
- name: Run CI checks
|
|
run: cargo make ci
|