From e9480b0e06f1e50dc7cab2cdb2935694a93e590a Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sat, 31 Jan 2026 11:29:50 +0000 Subject: [PATCH] Add Gitea Actions workflow: ci.yml --- .gitea/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..fefe081 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions/setup-rust@v1 + with: + rust-version: stable + + - name: Cache cargo + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgit2-dev pkg-config libssl-dev + + - name: Build + run: cargo build --all-features + + - name: Run tests + run: cargo test --all + + - name: Run clippy + run: cargo clippy --all-features -- -D warnings + + - name: Check formatting + run: cargo fmt --all -- --check