From f2d93672aac63dbd67cf2b73ebfe206ceab87ed4 Mon Sep 17 00:00:00 2001 From: Edinson Jim <4842086+edinsonjim@users.noreply.github.com> Date: Sat, 6 Dec 2025 15:40:39 +0100 Subject: [PATCH] feat: add CI workflow for building and testing Rust project --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..3d7facf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: F4a services CI + +on: + pull_request: + branches: ["main"] + types: [opened, synchronize, reopened] + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable + - name: Cache Cargo dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Cargo Check + run: cargo check --all-targets --locked + - name: Cargo Build + run: cargo build --verbose + - name: Cargo tests + run: cargo test --verbose + - name: Cargo Clippy + run: cargo clippy -- -D warnings + - name: Cargo fmt + run: cargo fmt --all --check