feat: add ci

This commit is contained in:
2026-04-09 16:46:00 +02:00
parent 248dc3d634
commit 4e969354a2
7 changed files with 151 additions and 18 deletions
+45
View File
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Rust CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
# - name: Run tests
# run: cargo test --workspace --verbose
- name: Run Clippy (linter)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run fmt check
run: cargo fmt --all -- --check
- name: Build project
run: cargo build --workspace --verbose