name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: "0"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: cargo check
run: cargo check --release
- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
run: cargo clippy --release -- -D warnings
- name: cargo test
run: cargo test --release