added cicd
Some checks failed
CI / build-and-test (push) Failing after 1m42s

This commit is contained in:
2025-07-07 14:52:20 +02:00
parent c115a1c1ed
commit ab79cf0c7f

47
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,47 @@
name: CI
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
build-and-test:
container:
image: rust:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Additional Components
run: rustup component add rustfmt clippy
- name: Cache Cargo Dependencies
uses: actions/cache@v3
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: Check Formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run Tests
run: cargo test --verbose
- name: Build Project
run: cargo build --verbose --release
- name: Build Binary
run: cargo build --bin precdu --release