add GH workflow for rust

This commit is contained in:
Nick Pegg 2025-05-08 12:17:21 -07:00
parent f3bc2f4f08
commit f225b4cd5b

37
.github/workflows/rust.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
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: Rust version
run: rustup --version
- name: Check
run: cargo check --verbose
- name: Clippy
run: cargo cippy
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose