From f9c9383119c5c4091f862ddf9ca21bd1a097a63d Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Wed, 4 Feb 2026 16:21:23 +0000 Subject: [PATCH] fix: resolve CI test failures and update test configuration --- gitpulse/.gitea/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 gitpulse/.gitea/workflows/ci.yml diff --git a/gitpulse/.gitea/workflows/ci.yml b/gitpulse/.gitea/workflows/ci.yml new file mode 100644 index 0000000..3ada91b --- /dev/null +++ b/gitpulse/.gitea/workflows/ci.yml @@ -0,0 +1,66 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustc --version + cargo --version + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev + + - name: Build + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo build --release 2>&1 + + - name: Run tests + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo test --all 2>&1 + + lint: + runs-on: ubuntu-latest + steps: + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustup component add clippy + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev + + - name: Run clippy + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo clippy --all-features -- -D warnings 2>&1 + + format: + runs-on: ubuntu-latest + steps: + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustup component add rustfmt + + - name: Check formatting + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo fmt --all -- --check 2>&1