Files
strawberries 81d775a7dd
Rust lint and build / Rust CI (push) Failing after 2m9s
added CI
2026-06-03 09:30:08 +02:00

47 lines
1004 B
YAML

on: [push, pull_request]
name: Rust lint and build
jobs:
ci:
name: Rust CI
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Cargo Cache
uses: actions/cache@v5
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: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Check
run: cargo check
- name: Clippy
run: cargo clippy -- -D warnings
- name: Test
run: cargo test
- name: Build
run: cargo build