Skip to content

Rust

Rust #44

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
paths: [ "**.rs", "Cargo.toml", ".github/workflows/rust.yml" ]
pull_request:
branches: [ "main" ]
paths: [ "**.rs", "Cargo.toml", ".github/workflows/rust.yml" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.65.0
components: clippy
- uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run tests
run: cargo test --all-features --verbose
- name: Run clippy
run: cargo clippy -- -D warnings