38 lines
804 B
YAML
38 lines
804 B
YAML
name: CI
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
components: clippy,rustfmt
|
|
cache: true
|
|
|
|
- name: Cache cargo registry & build
|
|
uses: swatinem/rust-cache@v1
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
|
|
- name: Build
|
|
run: cargo build --workspace --all-features --locked
|
|
|
|
- name: Run tests
|
|
run: cargo test --workspace --all-features --locked
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|