From c5b0120121796a634ca18464bae905ade72a9438 Mon Sep 17 00:00:00 2001 From: "r@l" Date: Tue, 24 Mar 2026 11:24:15 +0100 Subject: [PATCH] Add GitHub Actions CI workflow for Rust code quality checks * cargo fmt --check for consistent formatting * cargo clippy with -D warnings to catch common pitfalls * cargo build to verify compilation * Cargo caching for faster subsequent runs * Intentionally minimal: no fuzzer execution (requires full Fuel toolchain) Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1110a00 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + check: + name: Cargo Check & Clippy + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Cache cargo registry and build + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + 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 -- -D warnings + + - name: Build + run: cargo build