From c9f64760d434d4a7d5d39c0bfe1e5728c107980d Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 12 Mar 2026 00:35:56 +0545 Subject: [PATCH] chore(.github/workflows): add Rust CI workflow Add CI pipeline for Rust project to enforce formatting, clippy, and tests: New Features - Introduce Rust CI workflow triggered on push and pull_request to main/master - Execute cargo fmt check, cargo clippy with deny warnings, cargo build, and cargo test Enhancements - No enhancements Bug Fixes - No bug fixes --- .github/workflows/rust.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..c3a8eeb --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,36 @@ +name: Rust CI + +on: + push: + branches: [ "main", "master" ] + pull_request: + branches: [ "main", "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Build & Test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Run Clippy Lints + run: cargo clippy -- -D warnings + + - name: Build + run: cargo build --verbose + + - name: Run Tests + run: cargo test --verbose