From dd63e9414015a0590fdab762ec76620bff6526a2 Mon Sep 17 00:00:00 2001 From: icsboyx Date: Thu, 8 Jan 2026 14:28:56 +0100 Subject: [PATCH] Refactor CI workflow to include Rust build and test steps --- .gitea/workflows/test.yaml | 39 +++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 6bccfd0..2c9b454 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -1,17 +1,38 @@ -name: runner-test +name: Rust CI on: push: + branches: ["**"] + pull_request: jobs: - test: + build-test: runs-on: ubuntu-latest - steps: - - name: Say hello ok - run: echo "Runner OK" - test2: - runs-on: ubuntu-latest steps: - - name: 2 Say hello ok - run: echo "Runner OK" + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust (stable) + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + + - name: Format (check) + run: cargo fmt --all -- --check + + - name: Clippy + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: Build (release) + run: cargo build --release + + - name: Test + run: cargo test --all --all-features